Iwakura/modules/bspwm/wm.nix
2021-04-27 22:47:09 +00:00

65 lines
2.3 KiB
Nix

{ pkgs, config, ... }: {
home.keyboard.layout = "dvorak";
# home.file.".xinitrc".text = ''
# xrdb ~/.Xresources
# sxhkd -m -1 -c ~/.config/sxhkd/sxhkdrc &
# exec ${config.xsession.windowManager.command}
# '';
xsession = {
enable = true;
windowManager.bspwm = {
enable = true;
monitors = {
"LVDS-1" = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "IX" "X" ];
};
rules = {
"xterm" = {
state = "pseudo_tiled";
};
};
settings = {
border_width = 5;
window_gap = 10;
split_ration = 0.5;
};
startupPrograms = [
"feh --bg-fill .bg"
];
};
};
services.sxhkd = {
enable = true;
keybindings = {
"super + Return" = "urxvt";
"super + {_,shift + }d" = "rofi -show {run,window}";
"super + Escape" = "pkill -USR1 -x sxhkd";
"super + shift + Escape" = "bspc wm -r";
"super + m" = "bspc desktop -l next";
"super + {_,shift + }q" = "bspc node -{c,k}";
"super + {g, shift+g, c, r}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}";
"super + ctrl + {g,c,r,l}" = "bspc node -g {marked,locked,sticky,private}";
"super + y" = "bspc node newest.marked.local -n newest.!automatic.local";
"super + {_,shift + }{h,t,n,s}" = "bspc node -{f,s} {west,south,north,east}";
"super + {p,b,comma,period}" = "bspc node -f @{parent,brother,first,second}";
"super + {_,shift + }u" = "bspc node -f {next,prev}.local.!hidden.window";
"super + bracket{left,right}" = "bspc desktop -f {prev,next}.local";
"super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} '^{1-9,0}'";
"super + ctrl + {h,t,n,s}" = "bspc node -p {west,south,north,east}";
"super + ctrl + {1-9}" = "bspc node -o 0.{1-9}";
"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";
"super + alt + {h,t,n,s}" = "bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}";
"super + alt + shift + {h,t,n,s}" = "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}";
"super + {_,shift + }f" = "bspc node any.local -R {90,270}";
"super + ctrl + {_,shift + }f" = "bspc node -R {90,270}";
};
};
}