07ab0e0bcb6956171049d1c4d2009302d37d7e48
[~bandali/configs] / sxhkd / .config / sxhkd / sxhkdrc
1 #
2 # wm independent hotkeys
3 #
4
5 # terminal emulator
6 super + Return
7 urxvt
8 super + shift + Return
9 urxvt -name tiled
10
11 # program launcher
12 super + space
13 rofi -show run -font "Inconsolata 13"
14
15 # rofi-pass
16 super + shift + space
17 rofi-pass
18
19 # teiler
20 super + shift + s
21 teiler
22
23 super + z ; t
24 urxvt
25
26 super + z ; f
27 firefox-nightly
28
29 # firefox
30 #super + r
31 # firefox
32
33 # chromium
34 #super + c
35 # chromium
36
37 # emacs
38 super + e
39 emacs
40 # emacs -Q -l src/elisp/oremacs/init.el
41
42 # stalonetray
43 #super + minus
44 # toggle_tray&
45
46 # volume up
47 XF86AudioRaiseVolume
48 pamixer --allow-boost --increase 5
49
50 # volume down
51 XF86AudioLowerVolume
52 pamixer --allow-boost --decrease 5
53
54 # mute
55 XF86AudioMute
56 pamixer --toggle-mute
57
58 # monitor brightness
59 #XF86MonBrightness{Up,Down}
60 # xbacklight -time 0 {+5,-5}
61
62 # keyboard brightness
63 #XF86KbdBrightness{Up,Down}
64 # kbdlight {up,down}
65
66 XF86LaunchA
67 /home/amin/.local/bin/toggle-layout
68
69 # make sxhkd reload its configuration files:
70 super + Escape
71 pkill -USR1 -x sxhkd
72
73 #
74 # bspwm hotkeys
75 #
76
77 # quit bspwm normally
78 super + alt + Escape
79 bspc quit
80
81 # close and kill
82 super + {w,q}
83 bspc node -{c,k}
84
85 # alternate between the tiled and monocle layout
86 super + m
87 bspc desktop -l next
88
89 # if the current node is automatic, send it to the last manual, otherwise pull the last leaf
90 super + y
91 bspc query -N -n focused.automatic && bspc node -n last.!automatic || bspc node last.leaf -n focused
92
93 # swap the current node and the biggest node
94 super + g
95 bspc node -s biggest
96
97 #
98 # state/flags
99 #
100
101 # set the window state
102 super + {t,shift + t,s,f}
103 bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
104
105 # set the node flags
106 super + ctrl + {x,y,z}
107 bspc node -g {locked,sticky,private}
108
109 #
110 # focus/swap
111 #
112
113 # focus the node in the given direction
114 super + {_,shift + }{h,j,k,l}
115 bspc node -{f,s} {west,south,north,east}
116
117 # focus the node for the given path jump
118 super + {p,b,comma,period}
119 bspc node -f @{parent,brother,first,second}
120
121 # focus the next/previous node
122 super + {_,shift + }slash
123 bspc node -f {next,prev}
124
125 # focus the next/previous desktop
126 super + bracket{left,right}
127 bspc desktop -f {prev,next}
128
129 # send to next/prev desktop
130 super + shift + bracket{left,right}
131 bspc node -d {prev,next}
132
133 # focus the last node/desktop
134 super + {grave,Tab}
135 bspc {node,desktop} -f last
136
137 # focus the older or newer node in the focus history
138 super + {o,i}
139 bspc wm -h off; \
140 bspc node {older,newer} -f; \
141 bspc wm -h on
142
143 # focus or send to the given desktop
144 super + {_,shift + }{1-9,0}
145 bspc {desktop -f,node -d} '^{1-9,10}'
146
147 #
148 # preselect
149 #
150
151 # preselect the direction
152 super + ctrl + {h,j,k,l}
153 bspc node -p {west,south,north,east}
154
155 # preselect the ratio
156 super + ctrl + {1-9}
157 bspc node -o 0.{1-9}
158
159 # cancel the preselection for the focused node
160 super + ctrl + space
161 bspc node -p cancel
162
163 # cancel the preselection for the focused desktop
164 super + ctrl + shift + space
165 bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
166
167 #
168 # move/resize
169 #
170
171 # expand a window by moving one of its side outward
172 super + alt + {h,j,k,l}
173 bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
174
175 # contract a window by moving one of its side inward
176 super + alt + shift + {h,j,k,l}
177 bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
178
179 # move a floating window
180 super + {Left,Down,Up,Right}
181 bspc node -v {-20 0,0 20,0 -20,20 0}