1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-09 19:23:52 +00:00
ultima/modules/home/wm/sway/binds.nix

96 lines
2.5 KiB
Nix
Raw Normal View History

{
pkgs,
lib,
...
}:
2024-11-21 09:24:15 +00:00
let
# MODIFIERS
2024-12-21 09:11:03 +00:00
m = "Mod4";
2024-11-21 09:24:15 +00:00
s = "Shift";
a = "Alt";
# BUTTUONS
rt = "Return";
tb = "Tab";
sp = "Space";
pr = "Print";
# DISPATCHERS
ex = "exec";
ws = "workspace";
mv = "move";
cn = "container";
nm = "number";
# PROGRAMS
pic = "$(xdg-user-dir PICTURES)/$(date +'scr_%d-%m-%y|%H:%M:%S.png')";
in
2024-12-21 09:11:03 +00:00
with lib;
2024-12-20 13:10:11 +00:00
with pkgs;
{
2024-12-21 09:11:03 +00:00
wayland.windowManager.sway.config.keybindings = mkForce {
2024-12-20 13:10:11 +00:00
# SWAY NATIVE CMD
"${m}+q" = "kill";
"${m}+f" = "fullscreen";
"${m}+${s}+f" = "move position center";
"${m}+${sp}" = "floating toggle";
2024-11-21 09:24:15 +00:00
2024-12-20 13:10:11 +00:00
# PROGRAMS
"${m}+w" = "${ex} killall -SIGUSR1 waybar";
"${m}+${tb}" = "${ex} rofi";
2024-12-21 09:11:03 +00:00
"${m}+${rt}" = "${ex} kitty";
2024-11-21 09:24:15 +00:00
2024-12-20 13:10:11 +00:00
# SCREENSHOT
"${pr}" = "${grimblast}/bin/grimblast copysave area";
"${pr}+${s}" = "${grimblast}/bin/grimblast copysave output ${pic}";
"${pr}+${a}" = "${grimblast}/bin/grimblast copysave active ${pic}";
2024-11-21 09:24:15 +00:00
2024-12-20 13:10:11 +00:00
# CONTROL
"${m}+g" = "layout tabbed";
"${m}+${s}+g" = "layout toggle split";
2024-11-21 09:24:15 +00:00
2024-12-20 13:10:11 +00:00
"${m}+p" = "move scratchpad";
"${m}+${s}+p" = "scratchpad show";
2024-11-21 09:24:15 +00:00
2024-12-20 13:10:11 +00:00
"${m}+Home" = "exit";
"${m}+${s}+Home" = "reload";
2024-11-21 09:24:15 +00:00
2024-12-20 13:10:11 +00:00
# WORKSPACES SWITCH
"${m}+1" = "${ws} ${nm} 1";
"${m}+2" = "${ws} ${nm} 2";
"${m}+3" = "${ws} ${nm} 3";
"${m}+4" = "${ws} ${nm} 4";
"${m}+5" = "${ws} ${nm} 5";
"${m}+6" = "${ws} ${nm} 6";
"${m}+7" = "${ws} ${nm} 7";
"${m}+8" = "${ws} ${nm} 8";
"${m}+9" = "${ws} ${nm} 9";
"${m}+0" = "${ws} ${nm} 10";
2024-11-21 09:24:15 +00:00
2024-12-20 13:10:11 +00:00
# WORKSPACES MOVE
"${m}+${s}+1" = "${mv} ${cn} to ${ws} ${nm} 1";
"${m}+${s}+2" = "${mv} ${cn} to ${ws} ${nm} 2";
"${m}+${s}+3" = "${mv} ${cn} to ${ws} ${nm} 3";
"${m}+${s}+4" = "${mv} ${cn} to ${ws} ${nm} 4";
"${m}+${s}+5" = "${mv} ${cn} to ${ws} ${nm} 5";
"${m}+${s}+6" = "${mv} ${cn} to ${ws} ${nm} 6";
"${m}+${s}+7" = "${mv} ${cn} to ${ws} ${nm} 7";
"${m}+${s}+8" = "${mv} ${cn} to ${ws} ${nm} 8";
"${m}+${s}+9" = "${mv} ${cn} to ${ws} ${nm} 9";
"${m}+${s}+0" = "${mv} ${cn} to ${ws} ${nm} 10";
2024-11-21 09:24:15 +00:00
2024-12-20 13:10:11 +00:00
# HJKL
# "${m}+h" = "focus left";
# "${m}+j" = "focus down";
# "${m}+k" = "focus up";
# "${m}+l" = "focus right";
2024-11-21 09:24:15 +00:00
2024-12-20 13:10:11 +00:00
"${m}+${s}+h" = "move left";
"${m}+${s}+j" = "move down";
"${m}+${s}+k" = "move up";
"${m}+${s}+l" = "move right";
2024-11-21 09:24:15 +00:00
2024-12-20 13:10:11 +00:00
"${m}+${a}+h" = "move workspace to output left";
"${m}+${a}+j" = "move workspace to output down";
"${m}+${a}+k" = "move workspace to output up";
"${m}+${a}+l" = "move workspace to output right";
};
2024-11-21 09:24:15 +00:00
}