diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2025-07-13 03:56:55 +0530 |
|---|---|---|
| committer | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2025-07-13 03:56:55 +0530 |
| commit | 3b09a24e0a5733f4fb527120a9c710f511862023 (patch) | |
| tree | 1362d1608e5b5ff01dbc7f71dea04cb6b91c9aa8 /modules/graphical/sxhkd/keybindings/bspwm.nix | |
| parent | 085ff668ab45ac8d57c093e502b1175a86f2c14e (diff) | |
| download | home-manager-config-3b09a24e0a5733f4fb527120a9c710f511862023.tar.gz home-manager-config-3b09a24e0a5733f4fb527120a9c710f511862023.zip | |
Removed unecessary junk.
Diffstat (limited to 'modules/graphical/sxhkd/keybindings/bspwm.nix')
| -rw-r--r-- | modules/graphical/sxhkd/keybindings/bspwm.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/modules/graphical/sxhkd/keybindings/bspwm.nix b/modules/graphical/sxhkd/keybindings/bspwm.nix new file mode 100644 index 0000000..ed62ed4 --- /dev/null +++ b/modules/graphical/sxhkd/keybindings/bspwm.nix @@ -0,0 +1,45 @@ +{ createKeybinding, pkgs, lib }: + +let + bspc = "${pkgs.bspwm}/bin/bspc"; +in lib.mkMerge [ + (createKeybinding + "q" + "Kill current window." + "${bspc} node -c") + + (createKeybinding + "{1-9,0}" + "Switch workspace." + "${bspc} desktop -f {1-9,10}") + + (createKeybinding + "shift + {1-9,0}" + "Move window to workspace." + "${bspc} node -d {1-9,10} --follow") + + (createKeybinding + "{n,d,m}" + "Set current window mode (tiled, floating, fullscreen)." + "${bspc} node focused -t {tiled,floating,fullscreen}") + + (createKeybinding + "{_,shift + }{h,j,k,l}" + "Navigate between windows." + "${bspc} node --{focus,swap} {west,south,north,east}") + + # the indentation for each line is required to work with the help prompt + (createKeybinding + "ctrl + {h,j,k,l}" + "Resize current window." + '' + ${bspc} node {@parent/second -z left -20 0; \ + @parent/first -z right -20 0, \ + @parent/second -z top 0 +20; \ + @parent/first -z bottom 0 +20, \ + @parent/first -z bottom 0 -20; \ + @parent/second -z top 0 -20, \ + @parent/first -z right +20 0; \ + @parent/second -z left +20 0} +'') +] |
