42 lines
1.8 KiB
Nix
42 lines
1.8 KiB
Nix
{ pkgs, ... }:
|
|
{
|
|
services.sxhkd = {
|
|
enable = true;
|
|
package = pkgs.sxhkd;
|
|
keybindings = {
|
|
# Program hotkeys.
|
|
"alt + Tab" = "rofi -show window";
|
|
"super + r" = "rofi -show drun";
|
|
"super + x" = "alacritty";
|
|
"super + b" = "firefox";
|
|
"super + p" = "flameshot full -p $HOME/.local/screenshots";
|
|
"super + shift + p" = "flameshot gui -p $HOME/.local/screenshots";
|
|
"super + Escape" = "systemctl --user restart polybar";
|
|
"super + alt + {q,r}" = "bspc {quit,wm -r}";
|
|
|
|
# Function hotkeys.
|
|
"XF86AudioPrev" = "mpc prev";
|
|
"XF86AudioNext" = "mpc next";
|
|
"XF86AudioPlay" = "mpc toggle";
|
|
"XF86AudioLowerVolume" = "pamixer -d 5";
|
|
"XF86AudioRaiseVolume" = "pamixer -i 5";
|
|
"XF86AudioMute" = "pamixer -t";
|
|
|
|
# Manipulate window manager.
|
|
"super + q" = "bspc node -{c,k}";
|
|
"super + f" = "bspc node focused.tiled -t fullscreen";
|
|
"super + t" = "bspc node focused.fullscreen -t tiled";
|
|
"super + shift + f" = "bspc node focused.tiled -t floating";
|
|
"super + shift + t" = "bspc node focused.floating -t tiled";
|
|
"super + {_,shift + }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}";
|
|
"super + {_,shift}c" = "bspc node -f {next,prev}.local.!hidden.window";
|
|
"super + bracket{left,right}" = "bspc desktop -f {prev,next}.local";
|
|
"super + {grave,Tab}" = "bspc {node,desktop} -f last";
|
|
"super + {o,i}" = "bspc wm -h off; bspc node {older,newer} -f; bspc wm -h on";
|
|
"super + {_,shift + }{1-9,0}" = "bspc {desktop -f, node -d} '^{1-9,10}'";
|
|
"super + alt + {h,j,k,l}" = "bspc node -z {left -20 0, bottom 0 20, top 0 -20, right 20 0}";
|
|
"super + alt + shift {h,j,k,l}" = "bspc node -z {right -20 0, top 0 20, bottom 0 -20, left 20 0}";
|
|
"super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}";
|
|
};
|
|
};
|
|
}
|