2023-07-03 14:26:14 +01:00
|
|
|
{...}: {
|
2023-07-04 09:14:17 +01:00
|
|
|
imports = [./xfce.nix];
|
2023-04-04 14:20:49 +01:00
|
|
|
xsession.windowManager.bspwm = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
window_gap = 12;
|
|
|
|
border_width = 2;
|
|
|
|
split_ratio = 0.5;
|
2023-07-03 14:26:14 +01:00
|
|
|
borderless_monocle = false;
|
|
|
|
gapless_monocle = false;
|
|
|
|
pointer_modifier = "mod4";
|
2023-04-04 14:20:49 +01:00
|
|
|
pointer_action1 = "move";
|
|
|
|
pointer_action2 = "resize_side";
|
|
|
|
pointer_action3 = "resize_corner";
|
2023-07-03 15:10:32 +01:00
|
|
|
focus_follows_pointer = true;
|
2023-04-04 14:20:49 +01:00
|
|
|
};
|
2023-07-03 14:26:14 +01:00
|
|
|
monitors."primary" = ["dev" "browser" "files" "chat" "remote"];
|
2023-04-05 09:56:18 +01:00
|
|
|
rules = {
|
|
|
|
"Xfce4-terminal".state = "floating";
|
2023-04-08 10:32:55 +01:00
|
|
|
"Nm-connection-editor".state = "floating";
|
2023-04-11 11:03:01 +01:00
|
|
|
"Qemu-system-x86_64".state = "floating";
|
2023-04-08 10:32:55 +01:00
|
|
|
"Pavucontrol".state = "floating";
|
2023-07-03 14:26:14 +01:00
|
|
|
"Otpclient".state = "floating";
|
|
|
|
".blueman-manager-wrapped".state = "floating";
|
2023-07-04 09:14:17 +01:00
|
|
|
"neovide".desktop = "dev";
|
2023-07-03 14:26:14 +01:00
|
|
|
"firefox".desktop = "browser";
|
|
|
|
"Thunar".desktop = "files";
|
|
|
|
"Element".desktop = "chat";
|
|
|
|
"Signal".desktop = "chat";
|
|
|
|
"teams-for-linux".desktop = "chat";
|
2023-07-04 07:35:30 +01:00
|
|
|
"Nxplayer.bin".desktop = "remote";
|
2023-04-05 09:56:18 +01:00
|
|
|
};
|
2023-07-02 16:50:25 +01:00
|
|
|
extraConfig = ''
|
2023-07-02 17:05:11 +01:00
|
|
|
xsetroot -cursor_name left_ptr
|
2023-07-02 16:50:25 +01:00
|
|
|
polybar-msg cmd quit
|
|
|
|
echo "---" | tee -a /tmp/polybar.log
|
|
|
|
polybar 2>&1 | tee -a /tmp/polybar.log & disown
|
|
|
|
echo "Bars launched..."
|
|
|
|
'';
|
2023-04-04 14:20:49 +01:00
|
|
|
};
|
2023-07-04 09:14:17 +01:00
|
|
|
services.sxhkd = {
|
|
|
|
enable = true;
|
|
|
|
keybindings = {
|
|
|
|
# Terminal emulators
|
|
|
|
"super + Return" = "wezterm";
|
|
|
|
"super + shift + Return" = "xfce4-terminal --drop-down";
|
|
|
|
|
|
|
|
# Launcher
|
|
|
|
"super + @space" = "rofi -show drun";
|
|
|
|
|
2023-07-04 09:53:46 +01:00
|
|
|
# Shortcuts
|
|
|
|
"super + n" = "bspc desktop -f dev && neovide --multigrid";
|
|
|
|
"super + r" = "bspc desktop -f files && wezterm -e ranger";
|
|
|
|
"super + p" = "powermenu";
|
|
|
|
"super + F1" = "xfce4-screensaver-command --lock";
|
|
|
|
|
2023-07-04 09:14:17 +01:00
|
|
|
# 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";
|
2023-07-04 09:53:46 +01:00
|
|
|
"super + {_,shift + }c" = "bspc node -f {next,prev}.local.!hidden.window";
|
2023-07-04 09:14:17 +01:00
|
|
|
"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
|
2023-07-04 09:53:46 +01:00
|
|
|
"super + {_,shift + }{d,w,f,e}" = "bspc {desktop -f,node -d} '{dev,browser,files,chat}' --follow";
|
2023-07-04 09:14:17 +01:00
|
|
|
|
|
|
|
# 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";
|
|
|
|
|
|
|
|
# Volume control keys
|
|
|
|
"XF86AudioMute" = "pamixer -t";
|
|
|
|
"XF86AudioRaiseVolume" = "pamixer -i 2";
|
|
|
|
"XF86AudioLowerVolume" = "pamixer -d 2";
|
|
|
|
"XF86MonBrightnessUp" = "xbacklight +10";
|
|
|
|
"XF86MonBrightnessDown" = "xbacklight -10";
|
|
|
|
};
|
|
|
|
};
|
2023-04-04 14:20:49 +01:00
|
|
|
}
|