2024-07-28 23:30:50 +02:00
|
|
|
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 &
|
2024-07-29 11:22:33 +02:00
|
|
|
pkill waybar
|
2024-07-29 10:08:16 +02:00
|
|
|
waybar &
|
2024-07-28 23:30:50 +02:00
|
|
|
'';
|
|
|
|
|
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";
|
2024-07-29 10:07:24 +02:00
|
|
|
# layout management
|
2024-07-29 10:24:41 +02:00
|
|
|
"Super+Alt H" = "send-layout-cmd rivertile 'main-ratio -0.05'";
|
|
|
|
|
"Super+Alt L" = "send-layout-cmd rivertile 'main-ratio +0.05'";
|
|
|
|
|
"Super+Alt J" = "send-layout-cmd rivertile 'main-count -1'";
|
|
|
|
|
"Super+Alt K" = "send-layout-cmd rivertile 'main-count +1'";
|
2024-07-28 23:30:50 +02:00
|
|
|
# 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";
|
2024-07-29 11:03:43 +02:00
|
|
|
# music player control
|
2024-07-29 11:30:25 +02:00
|
|
|
# We have to specify None as the modifier, else riverctl complains that XF86Etc is not a valid modifier
|
|
|
|
|
"None XF86AudioPlay" = "spawn 'playerctl play-pause'";
|
|
|
|
|
"None XF86Bluetooth" = "spawn 'playerctl play-pause'";
|
|
|
|
|
"None XF86Tools" = "spawn 'playerctl previous'";
|
|
|
|
|
"None XF86Keyboard" = "spawn 'playerctl next'";
|
|
|
|
|
"None XF86Favorites" = "spawn 'cmus-remote -C player-next-album'";
|
2024-07-28 23:30:50 +02:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
map-pointer = {
|
|
|
|
|
normal = {
|
|
|
|
|
"Super BTN_LEFT" = "move-view";
|
|
|
|
|
"Super BTN_RIGHT" = "resize-view";
|
|
|
|
|
"Super BTN_MIDDLE" = "toggle-float";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|