nix/home-manager/wm/river.nix
Khaïs COLIN d12ea16812 river: kill waybar before start, to allow hot-reload
: Please enter the commit message for your changes. Lines starting
2024-07-29 10:24:25 +02:00

90 lines
3.4 KiB
Nix

let
swaylock-command = "swaylock --ignore-empty-password --show-failed-attempts --daemonize --show-keyboard-layout --color 212733";
in
{
wayland.windowManager.river = {
enable = true;
extraConfig = ''
rivertile -view-padding 0 -outer-padding 0 &
killall waybar
waybar &
'';
settings = {
border-width = 2;
keyboard-layout = "fr";
default-layout = "rivertile";
focus-follows-cursor = "normal";
map = {
normal = {
# screen lock & suspend
"Control+Alt L" = "spawn '${swaylock-command}'";
"Control+Alt+Shift L" = "spawn '${swaylock-command} & systemctl suspend'";
# terminal
"Super Return" = "spawn kitty";
# frequent programs
"Super Q" = "spawn firefox";
"Super D" = "spawn discord";
"Super G" = "spawn dolphin";
# program launcher
"Super R" = "spawn fuzzel";
# quit river
"Super+Alt+Control Q" = "exit";
# manipulate current view
"Super W" = "close";
"Super M" = "toggle-fullscreen";
"Super S" = "toggle-float";
"Super F" = "toggle-fullscreen";
# view focus
"Super H" = "focus-view left";
"Super J" = "focus-view down";
"Super K" = "focus-view up";
"Super L" = "focus-view right";
"Super I" = "focus-view previous";
"Super O" = "focus-view next";
# view movement
"Super+Shift H" = "swap left";
"Super+Shift J" = "swap down";
"Super+Shift K" = "swap up";
"Super+Shift L" = "swap right";
"Super+Shift I" = "swap previous";
"Super+Shift O" = "swap next";
# layout management
"Supert+Alt H" = "send-layout-cmd rivertile 'main-ratio -0.05'";
"Supert+Alt L" = "send-layout-cmd rivertile 'main-ratio +0.05'";
"Supert+Alt J" = "send-layout-cmd rivertile 'main-count -1'";
"Supert+Alt K" = "send-layout-cmd rivertile 'main-count +1'";
# tag (workspace) management
## switch to workspace
"Super ampersand" = "set-focused-tags 1";
"Super eacute" = "set-focused-tags 2";
"Super quotedbl" = "set-focused-tags 4";
"Super apostrophe" = "set-focused-tags 8";
"Super parenleft" = "set-focused-tags 16";
"Super minus" = "set-focused-tags 32";
"Super egrave" = "set-focused-tags 64";
"Super underscore" = "set-focused-tags 128";
"Super ccedilla" = "set-focused-tags 256";
"Super agrave" = "set-focused-tags 512";
## send to workspace
"Super+Shift ampersand" = "set-view-tags 1";
"Super+Shift eacute" = "set-view-tags 2";
"Super+Shift quotedbl" = "set-view-tags 4";
"Super+Shift apostrophe" = "set-view-tags 8";
"Super+Shift parenleft" = "set-view-tags 16";
"Super+Shift minus" = "set-view-tags 32";
"Super+Shift egrave" = "set-view-tags 64";
"Super+Shift underscore" = "set-view-tags 128";
"Super+Shift ccedilla" = "set-view-tags 256";
"Super+Shift agrave" = "set-view-tags 512";
};
};
map-pointer = {
normal = {
"Super BTN_LEFT" = "move-view";
"Super BTN_RIGHT" = "resize-view";
"Super BTN_MIDDLE" = "toggle-float";
};
};
};
};
}