-
Notifications
You must be signed in to change notification settings - Fork 0
/
sxhkd.nix
80 lines (62 loc) · 2.84 KB
/
sxhkd.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
services.sxhkd = {
enable = true;
keybindings = {
"super + x" = "alacritty";
"super + r" = "rofi -show drun -show-icons";
"super + b" = "schizofox";
"super + s" = "eww open board --toggle";
"super + m" = "spotify";
# restart bspwm
"super + ctrl + r" = "bspc wm -r";
# close window & rotate
"super + shift + {q,r}" = "bspc node {-c,@/ --rotate 90}";
# set the window state
"super + {d,z,f}" = "bspc node -t {tiled,floating,fullscreen}";
# focus,switch the node in the given direction
"super + {_,shift+ }{Left,Down,Up,Right}" = "bspc node -{f,s} {west,south,north,east}";
# focus,switch the node in the give direction(vim)
"super + {_,shift+ }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}";
# focus the last desktop,node and switch between tiled/monocle
"{super,alt} + {Tab,a}" = "bspc {desktop,node} {-f last,-l next}";
# preselect spawn direction
"super + ctrl + {a,s,w,d,space}" = "bspc node -p {west,south,north,east,cancel} ";
# power off,reboot,log out,lock
"super + ctrl + alt + shift + {p,r,q,s,l}" = "{sudo systemctl poweroff,sudo systemctl reboot,bspc quit,sudo systemctl suspend,physlock -d}";
# screenshot
"Print" = "flameshot gui";
# mute mic
"super + F8" = "mic-mute --mute";
# switch default output
"super + shift + F12" = "DS --ds";
# open pavucontrol
"super + alt + {s,q}" = "{bspc rule -a \* -o state=floating && pavucontrol,pkill pavucontrol}";
# volume control
"super + alt + {F11,F12}" = "pamixer --allow-boost --set-limit 150 -{d,i} 3";
"super + alt + shift + {F9,F10}" = "volume{ --browser-, --browser+}";
"super + alt + shift + {F11,F12}" = "volume{ --music-, --music+}";
"{XF86AudioLowerVolume,XF86AudioRaiseVolume,XF86AudioPrev,XF86AudioNext,XF86AudioPlay}" = "{amixer -D pulse sset Master 5%- > /dev/null,amixer -D pulse sset Master 5%+ > /dev/null,playerctl previous,playerctl next,playerctl play-pause}";
# wall
"super + w" = "~/scripts/wall.sh f";
"super + shift + w" = "~/scripts/wall.sh b";
"super + alt + w" = "~/scripts/wall.sh f f";
"super + shift + alt + w" = "~/scripts/wall.sh b f";
};
extraConfig = ''
# send the selected node to the given desktop
super + shift +{1-6}
desktop={1-6}; \
bspc node -d "$\{desktop\}.local"
for mon_id in $(bspc query -N -n); do \
bspc node "$\{mon_id\}:focused#$\{desktop\}.local" -d; \
done
# focus on the selected desktop on the selected monitor
super + {1-7}
desktop={1-7}; \
bspc desktop "$\{desktop\}.local" -f
for mon_id in $(bspc query -M -m); do \
bspc desktop "$\{mon_id\}:focused#$\{desktop\}.local" -f; \
done
'';
};
}