treewide: format using nixfmt-rfc-style
This commit is contained in:
parent
dba047b845
commit
399eafe9ed
98 changed files with 1930 additions and 990 deletions
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
@ -42,7 +52,13 @@ in
|
|||
bg_color = color.bg_dark;
|
||||
alert = "#000000";
|
||||
client = border: background: text: indicator: childBorder: {
|
||||
inherit border background text indicator childBorder;
|
||||
inherit
|
||||
border
|
||||
background
|
||||
text
|
||||
indicator
|
||||
childBorder
|
||||
;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -79,9 +95,7 @@ in
|
|||
};
|
||||
# setup cursor based on home.pointerCursor
|
||||
seat."*" = {
|
||||
xcursor_theme = "${config.home.pointerCursor.name} ${
|
||||
toString config.home.pointerCursor.size
|
||||
}";
|
||||
xcursor_theme = "${config.home.pointerCursor.name} ${toString config.home.pointerCursor.size}";
|
||||
hide_cursor = "when-typing enable";
|
||||
};
|
||||
};
|
||||
|
@ -132,7 +146,10 @@ in
|
|||
grim
|
||||
swappy
|
||||
(tesseract5.override {
|
||||
enableLanguages = [ "eng" "por" ];
|
||||
enableLanguages = [
|
||||
"eng"
|
||||
"por"
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
@ -26,11 +36,13 @@ in
|
|||
{
|
||||
profile = {
|
||||
name = "nomad";
|
||||
outputs = [{
|
||||
criteria = "eDP-1";
|
||||
status = "enable";
|
||||
position = "1920,312";
|
||||
}];
|
||||
outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
status = "enable";
|
||||
position = "1920,312";
|
||||
}
|
||||
];
|
||||
exec = [ "xrdb .Xresources" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
@ -48,6 +58,8 @@ in
|
|||
ExecStart = "${pkgs.mako}/bin/mako";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
Install = {
|
||||
WantedBy = [ "sway-session.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
# inherit (pkgs.uservars) key accent font theme;
|
||||
# inherit (theme) color;
|
||||
# inherit (pkgs) lib;
|
||||
|
||||
# mod = "Mod4";
|
||||
# menu = "wlauncher";
|
||||
# terminal = "alacritty";
|
||||
|
||||
# locked_binds =
|
||||
# lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||
# code_binds =
|
||||
# lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
||||
# return_mode = lib.mapAttrs (k: v: "${v}; mode default");
|
||||
# playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
|
||||
in
|
||||
# inherit (pkgs.uservars) key accent font theme;
|
||||
# inherit (theme) color;
|
||||
# inherit (pkgs) lib;
|
||||
# mod = "Mod4";
|
||||
# menu = "wlauncher";
|
||||
# terminal = "alacritty";
|
||||
# locked_binds =
|
||||
# lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||
# code_binds =
|
||||
# lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
||||
# return_mode = lib.mapAttrs (k: v: "${v}; mode default");
|
||||
# playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
|
||||
{
|
||||
wayland.windowManager.sway.config = {
|
||||
assigns = {
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
inherit (pkgs) lib;
|
||||
|
||||
|
@ -21,29 +26,27 @@ let
|
|||
|
||||
# mod+1 to swich to workspace 1
|
||||
# mod+shift+1 to move to workspace 1
|
||||
workspace_binds = lib.forEachMerge (lib.range 1 10) (i:
|
||||
workspace_binds = lib.forEachMerge (lib.range 1 10) (
|
||||
i:
|
||||
let
|
||||
key = toString (lib.mod i 10);
|
||||
workspaceNumber = toString i;
|
||||
in
|
||||
{
|
||||
"${mod}+${key}" = "workspace number ${workspaceNumber}";
|
||||
"${mod}+Shift+${key}" =
|
||||
"move container to workspace number ${workspaceNumber}";
|
||||
});
|
||||
"${mod}+Shift+${key}" = "move container to workspace number ${workspaceNumber}";
|
||||
}
|
||||
);
|
||||
|
||||
prev_next_binds =
|
||||
let
|
||||
maybe_window = key:
|
||||
if (lib.strings.hasInfix "button" key) then
|
||||
"--whole-window"
|
||||
else
|
||||
"";
|
||||
makePrevNextBindFunction = (prev_or_next:
|
||||
maybe_window = key: if (lib.strings.hasInfix "button" key) then "--whole-window" else "";
|
||||
makePrevNextBindFunction = (
|
||||
prev_or_next:
|
||||
map (key: {
|
||||
"${maybe_window key} ${mod}+${key}" =
|
||||
"workspace ${prev_or_next}_on_output";
|
||||
}));
|
||||
"${maybe_window key} ${mod}+${key}" = "workspace ${prev_or_next}_on_output";
|
||||
})
|
||||
);
|
||||
prev_binds = makePrevNextBindFunction "prev" [
|
||||
key.tabL
|
||||
"bracketleft"
|
||||
|
@ -67,36 +70,51 @@ let
|
|||
# for every direction with both arrow keys and vim keys
|
||||
movement_binds =
|
||||
let
|
||||
directions = [ "Left" "Up" "Right" "Down" ];
|
||||
directions = [
|
||||
"Left"
|
||||
"Up"
|
||||
"Right"
|
||||
"Down"
|
||||
];
|
||||
makeVimKeys = (k: key.${lib.toLower k});
|
||||
makeArrowKeys = (k: k);
|
||||
makeResizeCommand = direction:
|
||||
makeResizeCommand =
|
||||
direction:
|
||||
{
|
||||
Left = "shrink width 20px";
|
||||
Up = "shrink height 20px";
|
||||
Right = "grow width 20px";
|
||||
Down = "grow height 20px";
|
||||
}.${direction};
|
||||
}
|
||||
.${direction};
|
||||
in
|
||||
lib.forEachMerge [ makeVimKeys makeArrowKeys ] (prefixFun:
|
||||
lib.forEachMerge directions (direction:
|
||||
let
|
||||
resize_cmd = makeResizeCommand direction;
|
||||
keyBind = prefixFun direction;
|
||||
in
|
||||
{
|
||||
# Move focus
|
||||
"${mod}+${keyBind}" = "focus ${direction}";
|
||||
# Move window
|
||||
"${mod}+Shift+${keyBind}" = "move ${direction}";
|
||||
# Resize window
|
||||
"${mod}+Control+${keyBind}" = "resize ${resize_cmd}";
|
||||
# focus output
|
||||
"${mod}+mod1+${keyBind}" = "focus output ${direction}";
|
||||
# Move workspace to output
|
||||
"${mod}+mod1+Shift+${keyBind}" =
|
||||
"move workspace output ${direction}";
|
||||
}));
|
||||
lib.forEachMerge
|
||||
[
|
||||
makeVimKeys
|
||||
makeArrowKeys
|
||||
]
|
||||
(
|
||||
prefixFun:
|
||||
lib.forEachMerge directions (
|
||||
direction:
|
||||
let
|
||||
resize_cmd = makeResizeCommand direction;
|
||||
keyBind = prefixFun direction;
|
||||
in
|
||||
{
|
||||
# Move focus
|
||||
"${mod}+${keyBind}" = "focus ${direction}";
|
||||
# Move window
|
||||
"${mod}+Shift+${keyBind}" = "move ${direction}";
|
||||
# Resize window
|
||||
"${mod}+Control+${keyBind}" = "resize ${resize_cmd}";
|
||||
# focus output
|
||||
"${mod}+mod1+${keyBind}" = "focus output ${direction}";
|
||||
# Move workspace to output
|
||||
"${mod}+mod1+Shift+${keyBind}" = "move workspace output ${direction}";
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
parenting_binds = {
|
||||
"${mod}+equal" = "focus parent";
|
||||
|
@ -116,8 +134,7 @@ let
|
|||
XF86AudioRaiseVolume = "exec volumesh -i 10";
|
||||
XF86AudioLowerVolume = "exec volumesh -d 10";
|
||||
XF86AudioMute = "exec volumesh -t";
|
||||
XF86AudioMicMute =
|
||||
"exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
XF86AudioMicMute = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
# Control media
|
||||
XF86AudioPlay = "exec playerctl play-pause";
|
||||
XF86AudioPause = "exec playerctl play-pause";
|
||||
|
@ -136,8 +153,7 @@ let
|
|||
# Screen area to file
|
||||
"Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area";
|
||||
# Screen area to clipboard
|
||||
"Control+Shift+Print" =
|
||||
"exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip";
|
||||
"Control+Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip";
|
||||
# Focused monitor to clipboard
|
||||
"Control+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh clip";
|
||||
};
|
||||
|
@ -155,8 +171,7 @@ let
|
|||
"${mod}+Alt+x" = "exec pkill wl-crosshair || exec wl-crosshair";
|
||||
"${mod}+x" = "kill";
|
||||
"${mod}+m" = "mode audio";
|
||||
"${mod}+escape" =
|
||||
"mode passthrough;exec notify-send 'Passthrough on'";
|
||||
"${mod}+escape" = "mode passthrough;exec notify-send 'Passthrough on'";
|
||||
"${mod}+ctrl+k" = "exec swaymsg input type:pointer events disabled";
|
||||
"${mod}+ctrl+shift+k" = "exec swaymsg input type:pointer events enabled";
|
||||
"${mod}+f" = "fullscreen toggle";
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
inherit (pkgs) lib;
|
||||
|
||||
|
@ -8,10 +13,8 @@ let
|
|||
menu = "wlauncher";
|
||||
terminal = "alacritty";
|
||||
|
||||
locked =
|
||||
lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||
to-code =
|
||||
lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
||||
locked = lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||
to-code = lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
||||
quit-mode = lib.mapAttrs (k: v: "${v}; mode default");
|
||||
playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
|
||||
|
||||
|
@ -20,20 +23,32 @@ in
|
|||
{
|
||||
wayland.windowManager.sway.config.modes = {
|
||||
audio =
|
||||
(bind_group [ to-code locked ] {
|
||||
${key.tabR} = "exec volumesh -i 10";
|
||||
${key.tabL} = "exec volumesh -d 10";
|
||||
${key.right} = "exec mpc next";
|
||||
${key.left} = "exec mpc prev";
|
||||
${key.up} = "exec volumesh --mpd -i 10";
|
||||
${key.down} = "exec volumesh --mpd -d 10";
|
||||
}) //
|
||||
(bind_group [ locked quit-mode ] {
|
||||
"space" = "exec mpc toggle";
|
||||
"escape" = "";
|
||||
"q" = "";
|
||||
}) //
|
||||
(bind_group [ quit-mode ] {
|
||||
(bind_group
|
||||
[
|
||||
to-code
|
||||
locked
|
||||
]
|
||||
{
|
||||
${key.tabR} = "exec volumesh -i 10";
|
||||
${key.tabL} = "exec volumesh -d 10";
|
||||
${key.right} = "exec mpc next";
|
||||
${key.left} = "exec mpc prev";
|
||||
${key.up} = "exec volumesh --mpd -i 10";
|
||||
${key.down} = "exec volumesh --mpd -d 10";
|
||||
}
|
||||
)
|
||||
// (bind_group
|
||||
[
|
||||
locked
|
||||
quit-mode
|
||||
]
|
||||
{
|
||||
"space" = "exec mpc toggle";
|
||||
"escape" = "";
|
||||
"q" = "";
|
||||
}
|
||||
)
|
||||
// (bind_group [ quit-mode ] {
|
||||
"m" = "exec volumesh -t";
|
||||
"s" = "exec ${pkgs.pulse_sink}/bin/pulse_sink";
|
||||
|
||||
|
@ -47,28 +62,38 @@ in
|
|||
"Ctrl+s" = "exec ${pkgs.musmenu}/bin/musmenu psave";
|
||||
"Ctrl+o" = "exec ${pkgs.musmenu}/bin/musmenu pload";
|
||||
"Ctrl+d" = "exec ${pkgs.musmenu}/bin/musmenu pdelete";
|
||||
}) //
|
||||
{
|
||||
})
|
||||
// {
|
||||
"p" = "mode playerctl";
|
||||
"Ctrl+c" = "exec musmenu pclear";
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
playerctl =
|
||||
(bind_group [ to-code locked ] {
|
||||
${key.left} = "${playerctl} previous";
|
||||
${key.right} = "${playerctl} next";
|
||||
${key.up} = "${playerctl} volume 10+";
|
||||
${key.down} = "${playerctl} volume 10-";
|
||||
${key.tabR} = "${playerctl} volume 10+";
|
||||
${key.tabL} = "${playerctl} volume 10-";
|
||||
}) //
|
||||
(bind_group [ to-code quit-mode ] {
|
||||
"space" = "${playerctl} play-pause";
|
||||
"escape" = "";
|
||||
"q" = "";
|
||||
})
|
||||
;
|
||||
(bind_group
|
||||
[
|
||||
to-code
|
||||
locked
|
||||
]
|
||||
{
|
||||
${key.left} = "${playerctl} previous";
|
||||
${key.right} = "${playerctl} next";
|
||||
${key.up} = "${playerctl} volume 10+";
|
||||
${key.down} = "${playerctl} volume 10-";
|
||||
${key.tabR} = "${playerctl} volume 10+";
|
||||
${key.tabL} = "${playerctl} volume 10-";
|
||||
}
|
||||
)
|
||||
// (bind_group
|
||||
[
|
||||
to-code
|
||||
quit-mode
|
||||
]
|
||||
{
|
||||
"space" = "${playerctl} play-pause";
|
||||
"escape" = "";
|
||||
"q" = "";
|
||||
}
|
||||
);
|
||||
|
||||
passthrough = {
|
||||
"${mod}+escape" = "mode default;exec notify-send 'Passthrough off'";
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
|
||||
asScript = filename: text: toString (pkgs.writeShellScript filename text);
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
|
|
@ -1,38 +1,53 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) theme font desktop;
|
||||
inherit (theme) color gtk_theme icon_theme cursor_theme;
|
||||
inherit (theme)
|
||||
color
|
||||
gtk_theme
|
||||
icon_theme
|
||||
cursor_theme
|
||||
;
|
||||
in
|
||||
lib.mkIf (desktop == "sway")
|
||||
{
|
||||
lib.mkIf (desktop == "sway") {
|
||||
home.pointerCursor = {
|
||||
name = cursor_theme;
|
||||
size = 24;
|
||||
package = pkgs.bibata-cursors;
|
||||
gtk.enable = true;
|
||||
};
|
||||
gtk = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = font.interface;
|
||||
size = font.size.small;
|
||||
};
|
||||
theme = {
|
||||
name = gtk_theme;
|
||||
package = pkgs.orchis_theme_compact;
|
||||
};
|
||||
iconTheme = {
|
||||
name = icon_theme;
|
||||
package = pkgs.papirus_red;
|
||||
};
|
||||
} // (
|
||||
let
|
||||
shared.extraConfig = {
|
||||
gtk-decoration-layout = "menu:";
|
||||
gtk =
|
||||
{
|
||||
enable = true;
|
||||
font = {
|
||||
name = font.interface;
|
||||
size = font.size.small;
|
||||
};
|
||||
in
|
||||
{ gtk4 = shared; gtk3 = shared; }
|
||||
);
|
||||
theme = {
|
||||
name = gtk_theme;
|
||||
package = pkgs.orchis_theme_compact;
|
||||
};
|
||||
iconTheme = {
|
||||
name = icon_theme;
|
||||
package = pkgs.papirus_red;
|
||||
};
|
||||
}
|
||||
// (
|
||||
let
|
||||
shared.extraConfig = {
|
||||
gtk-decoration-layout = "menu:";
|
||||
};
|
||||
in
|
||||
{
|
||||
gtk4 = shared;
|
||||
gtk3 = shared;
|
||||
}
|
||||
);
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue