Move sxhkd settings into bspwm expression as it's very specific anyway

This commit is contained in:
Evie Litherland-Smith 2023-07-04 09:14:17 +01:00
parent 0a1808a32e
commit d3da11b1b0
2 changed files with 53 additions and 58 deletions

View file

@ -1,8 +1,5 @@
{...}: { {...}: {
imports = [ imports = [./xfce.nix];
./xfce.nix
./sxhkd.nix
];
xsession.windowManager.bspwm = { xsession.windowManager.bspwm = {
enable = true; enable = true;
settings = { settings = {
@ -25,7 +22,7 @@
"Pavucontrol".state = "floating"; "Pavucontrol".state = "floating";
"Otpclient".state = "floating"; "Otpclient".state = "floating";
".blueman-manager-wrapped".state = "floating"; ".blueman-manager-wrapped".state = "floating";
"org.wezfurlong.wezterm".desktop = "dev"; "neovide".desktop = "dev";
"firefox".desktop = "browser"; "firefox".desktop = "browser";
"Thunar".desktop = "files"; "Thunar".desktop = "files";
"Element".desktop = "chat"; "Element".desktop = "chat";
@ -41,4 +38,55 @@
echo "Bars launched..." echo "Bars launched..."
''; '';
}; };
services.sxhkd = {
enable = true;
keybindings = {
# Terminal emulators
"super + Return" = "wezterm";
"super + shift + Return" = "xfce4-terminal --drop-down";
# Launcher
"super + @space" = "rofi -show drun";
# bspwm hotkeys
"super + Escape" = "pkill -USR1 -x sxhkd";
"super + alt + {q,r}" = "bspc {quit,wm -r}";
"super + {_,shift + }q" = "bspc node -{c,k}";
"super + m" = "bspc desktop -l next";
# State/Flags
"super + {t,shift + t,s,shift + m}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}";
# Focus/Scap
"super + {_,shift + }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}";
"super + {_,shift + }{Left,Down,Up,Right}" = "bspc node -{f,s} {west,south,north,east}";
"super + {_,shift + }{comma,period}" = "bspc {desktop -f,node -d} {prev,next}.local.occupied --follow";
"super + {_,shift + }n" = "bspc {desktop -f,node -d} next.local --follow";
"super + {_,shift + }bracket{left,right}" = "bspc {monitor -f,node -m} {prev,next} --follow";
"super + {grave,Tab}" = "bspc {node,desktop} -f last";
"super + {_,shift + }{1-9}" = "bspc {desktop -f,node -d} '^{1-9}' --follow";
# Named workspaces
"super + {_,shift + }{d,w,f,c,r}" = "bspc {desktop -f,node -d} '{dev,browser,files,chat,remote}' --follow";
# Preselect
"super + ctrl + {h,j,k,l}" = "bspc node -p {west,south,north,east}";
"super + ctrl + space" = "bspc node -p cancel";
"super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel";
# Screenshot
"Print" = "flameshot gui";
# Shortcuts
"super + e" = "thunar";
"super + p" = "powermenu";
"super + F1" = "xfce4-screensaver-command --lock";
# Volume control keys
"XF86AudioMute" = "pamixer -t";
"XF86AudioRaiseVolume" = "pamixer -i 2";
"XF86AudioLowerVolume" = "pamixer -d 2";
"XF86MonBrightnessUp" = "xbacklight +10";
"XF86MonBrightnessDown" = "xbacklight -10";
};
};
} }

View file

@ -1,53 +0,0 @@
{...}: {
services.sxhkd = {
enable = true;
keybindings = {
# Terminal emulators
"super + Return" = "wezterm";
"super + shift + Return" = "xfce4-terminal --drop-down";
# Launcher
"super + @space" = "rofi -show drun";
# bspwm hotkeys
"super + Escape" = "pkill -USR1 -x sxhkd";
"super + alt + {q,r}" = "bspc {quit,wm -r}";
"super + {_,shift + }q" = "bspc node -{c,k}";
"super + m" = "bspc desktop -l next";
# State/Flags
"super + {t,shift + t,s,shift + m}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}";
# Focus/Scap
"super + {_,shift + }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}";
"super + {_,shift + }{Left,Down,Up,Right}" = "bspc node -{f,s} {west,south,north,east}";
"super + {_,shift + }{comma,period}" = "bspc {desktop -f,node -d} {prev,next}.local.occupied --follow";
"super + {_,shift + }n" = "bspc {desktop -f,node -d} next.local --follow";
"super + {_,shift + }bracket{left,right}" = "bspc {monitor -f,node -m} {prev,next} --follow";
"super + {grave,Tab}" = "bspc {node,desktop} -f last";
"super + {_,shift + }{1-9}" = "bspc {desktop -f,node -d} '^{1-9}' --follow";
# Named workspaces
"super + {_,shift + }{d,w,f,c,r}" = "bspc {desktop -f,node -d} '{dev,browser,files,chat,remote}' --follow";
# Preselect
"super + ctrl + {h,j,k,l}" = "bspc node -p {west,south,north,east}";
"super + ctrl + space" = "bspc node -p cancel";
"super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel";
# Screenshot
"Print" = "flameshot gui";
# Shortcuts
"super + e" = "thunar";
"super + p" = "powermenu";
"super + F1" = "xfce4-screensaver-command --lock";
# Volume control keys
"XF86AudioMute" = "pamixer -t";
"XF86AudioRaiseVolume" = "pamixer -i 2";
"XF86AudioLowerVolume" = "pamixer -d 2";
"XF86MonBrightnessUp" = "xbacklight +10";
"XF86MonBrightnessDown" = "xbacklight -10";
};
};
}