From fb6fae78379276b8d8be97ac6fe7a4771cc61b0d Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Thu, 12 Mar 2026 22:50:38 +0530 Subject: Added formatter and performed formatting --- modules/desktop/sxhkd/keybindings/bspwm.nix | 61 ++++++++++++----------------- 1 file changed, 26 insertions(+), 35 deletions(-) (limited to 'modules/desktop/sxhkd/keybindings/bspwm.nix') diff --git a/modules/desktop/sxhkd/keybindings/bspwm.nix b/modules/desktop/sxhkd/keybindings/bspwm.nix index cd838a3..097b976 100644 --- a/modules/desktop/sxhkd/keybindings/bspwm.nix +++ b/modules/desktop/sxhkd/keybindings/bspwm.nix @@ -1,45 +1,36 @@ -{ createKeybinding, pkgs, lib }: +{ + createKeybinding, + pkgs, + lib, +}: let bspc = "${pkgs.bspwm}/bin/bspc"; -in lib.mkMerge [ - (createKeybinding - "q" - "Kill current window." - "${bspc} node -c") +in +lib.mkMerge [ + (createKeybinding "q" "Kill current window." "${bspc} node -c") - (createKeybinding - "{1-9,0}" - "Switch workspace." - "${bspc} desktop -f {1-9,10}") + (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 "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 "{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}") + (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} -'') + (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} + '') ] -- cgit v1.2.3