btw i use nix
1set $volume_inc exec pactl set-sink-volume @DEFAULT_SINK@ +10% ; exec st pulse -t 500
2set $volume_dec exec pactl set-sink-volume @DEFAULT_SINK@ -10% ; exec st pulse -t 500
3set $volume_inc_1 exec pactl set-sink-volume @DEFAULT_SINK@ +1% ; exec st pulse -t 500
4set $volume_dec_1 exec pactl set-sink-volume @DEFAULT_SINK@ -1% ; exec st pulse -t 500
5set $volume_inc_5 exec pactl set-sink-volume @DEFAULT_SINK@ +5% ; exec st pulse -t 500
6set $volume_dec_5 exec pactl set-sink-volume @DEFAULT_SINK@ -5% ; exec st pulse -t 500
7set $volume_mute exec pactl set-sink-mute @DEFAULT_SINK@ toggle ; exec st pulse -t 500
8set $volume_mic_mute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle ; exec st pulse -t 500
9
10set $play_pause exec playerctl play-pause && st player
11set $play_prev exec playerctl previous
12set $play_next exec playerctl next
13set $play_stop exec playerctl stop && st player
14
15set $backlight_inc exec brightnessctl set 10%+ ; exec st backlight -t 500
16set $backlight_dec exec brightnessctl set 10%- ; exec st backlight -t 500
17set $backlight_inc_1 exec brightnessctl set 1%+ ; exec st backlight -t 500
18set $backlight_dec_1 exec brightnessctl set 1%- ; exec st backlight -t 500
19set $backlight_inc_5 exec brightnessctl set 5%+ ; exec st backlight -t 500
20set $backlight_dec_5 exec brightnessctl set 5%- ; exec st backlight -t 500
21
22bindsym @locked@ XF86AudioRaiseVolume $volume_inc
23bindsym @locked@ XF86AudioLowerVolume $volume_dec
24bindsym @locked@ Shift+XF86AudioRaiseVolume $volume_inc_1
25bindsym @locked@ Shift+XF86AudioLowerVolume $volume_dec_1
26bindsym @locked@ Control+XF86AudioRaiseVolume $volume_inc_5
27bindsym @locked@ Control+XF86AudioLowerVolume $volume_dec_5
28bindsym @locked@ XF86AudioMute $volume_mute
29bindsym @locked@ XF86AudioMicMute $volume_mic_mute
30
31bindsym @locked@ XF86AudioPlay $play_pause
32bindsym @locked@ XF86AudioPause $play_pause
33bindsym @locked@ XF86AudioPrev $play_prev
34bindsym @locked@ XF86AudioNext $play_next
35bindsym @locked@ XF86AudioStop $play_stop
36
37bindsym @locked@ XF86MonBrightnessUp $backlight_inc
38bindsym @locked@ XF86MonBrightnessDown $backlight_dec
39bindsym @locked@ Shift+XF86MonBrightnessUp $backlight_inc_1
40bindsym @locked@ Shift+XF86MonBrightnessDown $backlight_dec_1
41bindsym @locked@ Control+XF86MonBrightnessUp $backlight_inc_5
42bindsym @locked@ Control+XF86MonBrightnessDown $backlight_dec_5
43
44floating_modifier $mod
45
46bindsym $mod+Return exec $term
47bindsym $mod+Shift+Return exec $term attach
48
49bindsym $mod+Shift+BackSpace kill
50
51bindsym $mod+d exec @drun@
52
53bindsym $mod+g split h
54bindsym $mod+v split v
55
56bindsym $mod+f fullscreen toggle; exec notify-send "fullscreen" -t 500
57bindsym $mod+Shift+f exec wtype -k F11; exec notify-send "fullscreen" -t 500
58bindsym $mod+Control+f fullscreen toggle global; exec notify-send "fullscreen" -t 500
59# toggle bar
60bindsym $mod+$alt+f exec pgrep @bar@ && pkill @bar@ || @bar@ --bar_id bar-0
61
62bindsym $mod+s layout stacking
63bindsym $mod+w layout tabbed
64bindsym $mod+e layout toggle split
65
66bindsym $mod+$alt+g split h; layout tabbed;
67bindsym $mod+$alt+v split v; layout stacking;
68
69# toggle tiling / floating
70bindsym $mod+Shift+space floating toggle
71# change focus between tiling / floating windows
72bindsym $mod+space focus mode_toggle
73bindsym $mod+Control+space sticky toggle
74
75bindsym $mod+a focus parent
76bindsym $mod+z focus child
77bindsym $mod+Shift+a exec $SCRIPT_DIR/focus_root.sh
78bindsym $mod+Shift+z exec $SCRIPT_DIR/focus_leaf.sh
79
80set $ws1 "1"
81set $ws2 "2"
82set $ws3 "3"
83set $ws4 "4"
84set $ws5 "5"
85set $ws6 "6"
86set $ws7 "7"
87set $ws8 "8"
88set $ws9 "9"
89set $ws10 "10"
90set $ws11 "11"
91set $ws12 "12"
92set $ws13 "13"
93set $ws14 "14"
94set $ws15 "15"
95set $ws16 "16"
96set $ws17 "17"
97set $ws18 "18"
98set $ws19 "19"
99set $ws20 "20"
100
101# switch to workspace
102bindsym $mod+1 workspace number $ws1 ; exec dunstify -C `cat ~/.cache/st_id`
103bindsym $mod+2 workspace number $ws2 ; exec dunstify -C `cat ~/.cache/st_id`
104bindsym $mod+3 workspace number $ws3 ; exec dunstify -C `cat ~/.cache/st_id`
105bindsym $mod+4 workspace number $ws4 ; exec dunstify -C `cat ~/.cache/st_id`
106bindsym $mod+5 workspace number $ws5 ; exec dunstify -C `cat ~/.cache/st_id`
107bindsym $mod+6 workspace number $ws6 ; exec dunstify -C `cat ~/.cache/st_id`
108bindsym $mod+7 workspace number $ws7 ; exec dunstify -C `cat ~/.cache/st_id`
109bindsym $mod+8 workspace number $ws8 ; exec dunstify -C `cat ~/.cache/st_id`
110bindsym $mod+9 workspace number $ws9 ; exec dunstify -C `cat ~/.cache/st_id`
111bindsym $mod+0 workspace number $ws10 ; exec dunstify -C `cat ~/.cache/st_id`
112bindsym $mod+Control+1 workspace number $ws11 ; exec dunstify -C `cat ~/.cache/st_id`
113bindsym $mod+Control+2 workspace number $ws12 ; exec dunstify -C `cat ~/.cache/st_id`
114bindsym $mod+Control+3 workspace number $ws13 ; exec dunstify -C `cat ~/.cache/st_id`
115bindsym $mod+Control+4 workspace number $ws14 ; exec dunstify -C `cat ~/.cache/st_id`
116bindsym $mod+Control+5 workspace number $ws15 ; exec dunstify -C `cat ~/.cache/st_id`
117bindsym $mod+Control+6 workspace number $ws16 ; exec dunstify -C `cat ~/.cache/st_id`
118bindsym $mod+Control+7 workspace number $ws17 ; exec dunstify -C `cat ~/.cache/st_id`
119bindsym $mod+Control+8 workspace number $ws18 ; exec dunstify -C `cat ~/.cache/st_id`
120bindsym $mod+Control+9 workspace number $ws19 ; exec dunstify -C `cat ~/.cache/st_id`
121bindsym $mod+Control+0 workspace number $ws20 ; exec dunstify -C `cat ~/.cache/st_id`
122
123# move focused container to workspace
124bindsym $mod+Shift+1 move container to workspace number $ws1
125bindsym $mod+Shift+2 move container to workspace number $ws2
126bindsym $mod+Shift+3 move container to workspace number $ws3
127bindsym $mod+Shift+4 move container to workspace number $ws4
128bindsym $mod+Shift+5 move container to workspace number $ws5
129bindsym $mod+Shift+6 move container to workspace number $ws6
130bindsym $mod+Shift+7 move container to workspace number $ws7
131bindsym $mod+Shift+8 move container to workspace number $ws8
132bindsym $mod+Shift+9 move container to workspace number $ws9
133bindsym $mod+Shift+0 move container to workspace number $ws10
134bindsym $mod+Shift+Control+1 move container to workspace number $ws11
135bindsym $mod+Shift+Control+2 move container to workspace number $ws12
136bindsym $mod+Shift+Control+3 move container to workspace number $ws13
137bindsym $mod+Shift+Control+4 move container to workspace number $ws14
138bindsym $mod+Shift+Control+5 move container to workspace number $ws15
139bindsym $mod+Shift+Control+6 move container to workspace number $ws16
140bindsym $mod+Shift+Control+7 move container to workspace number $ws17
141bindsym $mod+Shift+Control+8 move container to workspace number $ws18
142bindsym $mod+Shift+Control+9 move container to workspace number $ws19
143bindsym $mod+Shift+Control+0 move container to workspace number $ws20
144
145# rename workspace
146bindsym $mod+$alt+1 exec @wmmsg@ rename workspace to $ws1
147bindsym $mod+$alt+2 exec @wmmsg@ rename workspace to $ws2
148bindsym $mod+$alt+3 exec @wmmsg@ rename workspace to $ws3
149bindsym $mod+$alt+4 exec @wmmsg@ rename workspace to $ws4
150bindsym $mod+$alt+5 exec @wmmsg@ rename workspace to $ws5
151bindsym $mod+$alt+6 exec @wmmsg@ rename workspace to $ws6
152bindsym $mod+$alt+7 exec @wmmsg@ rename workspace to $ws7
153bindsym $mod+$alt+8 exec @wmmsg@ rename workspace to $ws8
154bindsym $mod+$alt+9 exec @wmmsg@ rename workspace to $ws9
155bindsym $mod+$alt+0 exec @wmmsg@ rename workspace to $ws10
156bindsym $mod+$alt+Control+1 exec @wmmsg@ rename workspace to $ws11
157bindsym $mod+$alt+Control+2 exec @wmmsg@ rename workspace to $ws12
158bindsym $mod+$alt+Control+3 exec @wmmsg@ rename workspace to $ws13
159bindsym $mod+$alt+Control+4 exec @wmmsg@ rename workspace to $ws14
160bindsym $mod+$alt+Control+5 exec @wmmsg@ rename workspace to $ws15
161bindsym $mod+$alt+Control+6 exec @wmmsg@ rename workspace to $ws16
162bindsym $mod+$alt+Control+7 exec @wmmsg@ rename workspace to $ws17
163bindsym $mod+$alt+Control+8 exec @wmmsg@ rename workspace to $ws18
164bindsym $mod+$alt+Control+9 exec @wmmsg@ rename workspace to $ws19
165bindsym $mod+$alt+Control+0 exec @wmmsg@ rename workspace to $ws20
166
167bindsym $mod+Shift+numbersign move scratchpad
168bindsym $mod+numbersign scratchpad show
169
170bindsym $mod+Escape exec st
171bindsym $mod+Shift+Escape exec st date workspace mail idle disk temperature load_average memory backlight player battery
172
173# grave=`
174bindsym $mod+grave workspace back_and_forth ; exec dunstify -C `cat ~/.cache/st_id` && st workspace -t 500
175bindsym $mod+Shift+grave move container to workspace back_and_forth
176
177bindsym $mod+period workspace next_on_output ; exec st workspace -t 500
178bindsym $mod+comma workspace prev_on_output ; exec st workspace -t 500
179
180bindsym $mod+Shift+period move container to workspace next_on_output
181bindsym $mod+Shift+comma move container to workspace prev_on_output
182
183# movement
184bindsym $mod+h focus left
185bindsym $mod+j focus down
186bindsym $mod+k focus up
187bindsym $mod+l focus right
188
189bindsym $mod+Shift+h move left 25px
190bindsym $mod+Shift+j move down 25px
191bindsym $mod+Shift+k move up 25px
192bindsym $mod+Shift+l move right 25px
193
194bindsym $mod+Control+h resize shrink width 25px or 5ppt
195bindsym $mod+Control+j resize grow height 25px or 5ppt
196bindsym $mod+Control+k resize shrink height 25px or 5ppt
197bindsym $mod+Control+l resize grow width 25px or 5ppt
198
199bindsym $mod+Control+Shift+h resize shrink width 1px
200bindsym $mod+Control+Shift+j resize grow height 1px
201bindsym $mod+Control+Shift+k resize shrink height 1px
202bindsym $mod+Control+Shift+l resize grow width 1px
203
204bindsym $mod+$alt+h focus output left ; exec st workspace -t 500
205bindsym $mod+$alt+j focus output down ; exec st workspace -t 500
206bindsym $mod+$alt+k focus output up ; exec st workspace -t 500
207bindsym $mod+$alt+l focus output right ; exec st workspace -t 500
208
209bindsym $mod+$alt+Shift+h move container to output left
210bindsym $mod+$alt+Shift+j move container to output down
211bindsym $mod+$alt+Shift+k move container to output up
212bindsym $mod+$alt+Shift+l move container to output right
213
214bindsym $mod+$alt+Control+h move workspace to output left
215bindsym $mod+$alt+Control+j move workspace to output down
216bindsym $mod+$alt+Control+k move workspace to output up
217bindsym $mod+$alt+Control+l move workspace to output right
218
219
220bindsym $mod+left focus left
221bindsym $mod+down focus down
222bindsym $mod+up focus up
223bindsym $mod+right focus right
224
225bindsym $mod+Shift+left move left 25px
226bindsym $mod+Shift+down move down 25px
227bindsym $mod+Shift+up move up 25px
228bindsym $mod+Shift+right move right 25px
229
230bindsym $mod+Control+left resize shrink width 25px or 5ppt
231bindsym $mod+Control+down resize grow height 25px or 5ppt
232bindsym $mod+Control+up resize shrink height 25px or 5ppt
233bindsym $mod+Control+right resize grow width 25px or 5ppt
234
235bindsym $mod+Control+Shift+left resize shrink width 1px
236bindsym $mod+Control+Shift+down resize grow height 1px
237bindsym $mod+Control+Shift+up resize shrink height 1px
238bindsym $mod+Control+Shift+right resize grow width 1px
239
240bindsym $mod+$alt+left focus output left ; exec st workspace -t 500
241bindsym $mod+$alt+down focus output down ; exec st workspace -t 500
242bindsym $mod+$alt+up focus output up ; exec st workspace -t 500
243bindsym $mod+$alt+right focus output right ; exec st workspace -t 500
244
245bindsym $mod+$alt+Shift+left move container to output left ; exec st workspace -t 500
246bindsym $mod+$alt+Shift+down move container to output down ; exec st workspace -t 500
247bindsym $mod+$alt+Shift+up move container to output up ; exec st workspace -t 500
248bindsym $mod+$alt+Shift+right move container to output right ; exec st workspace -t 500
249
250bindsym $mod+$alt+Control+left move workspace to output left ; exec st workspace -t 500
251bindsym $mod+$alt+Control+down move workspace to output down ; exec st workspace -t 500
252bindsym $mod+$alt+Control+up move workspace to output up ; exec st workspace -t 500
253bindsym $mod+$alt+Control+right move workspace to output right ; exec st workspace -t 500
254
255bindsym $mod+bracketleft focus output left ; exec dunstify -C `cat ~/.cache/st_id` && st workspace -t 500
256bindsym $mod+bracketright focus output right ; exec dunstify -C `cat ~/.cache/st_id` && st workspace -t 500
257bindsym $mod+Shift+bracketleft move container to output left ; exec dunstify -C `cat ~/.cache/st_id` && st workspace -t 500
258bindsym $mod+Shift+bracketright move container to output right ; exec dunstify -C `cat ~/.cache/st_id` && st workspace -t 500
259bindsym $mod+Control+bracketleft move workspace to output left ; exec dunstify -C `cat ~/.cache/st_id` && st workspace -t 500
260bindsym $mod+Control+bracketright move workspace to output right ; exec dunstify -C `cat ~/.cache/st_id` && st workspace -t 500
261
262bindsym $mod+m exec $SCRIPT_DIR/ws_switch.sh "$SCRIPT_DIR/get_free_ws_num.sh"
263bindsym $mod+Shift+m exec $SCRIPT_DIR/ws_mv.sh "$SCRIPT_DIR/get_free_ws_num.sh"
264bindsym $mod+Control+m exec $SCRIPT_DIR/ws_switch_mv.sh "$SCRIPT_DIR/get_free_ws_num.sh"
265
266bindsym $mod+backslash exec $SCRIPT_DIR/ws_switch.sh "$SCRIPT_DIR/select_ws.sh"
267bindsym $mod+Shift+backslash exec $SCRIPT_DIR/ws_mv.sh "$SCRIPT_DIR/select_ws.sh"
268bindsym $mod+Control+backslash exec $SCRIPT_DIR/ws_switch_mv.sh "$SCRIPT_DIR/select_ws.sh"
269
270# t = title
271bindsym $mod+t exec $SCRIPT_DIR/title_ws.sh "$SCRIPT_DIR/get_ws_title.sh $SCRIPT_DIR/get_cur_ws_name.sh"
272
273bindsym $mod+Tab exec $SCRIPT_DIR/window_switcher.sh
274bindsym $mod+Shift+Tab exec $SCRIPT_DIR/window_switcher_scratch.sh
275
276bindsym button2 kill
277
278bindsym $mod+i exec @i3_workspace_history@ -mode=forward @i3_workspace_history_args@; exec st workspace -t 500
279bindsym $mod+o exec @i3_workspace_history@ -mode=back @i3_workspace_history_args@; exec st workspace -t 500
280
281set $mode_gaps gaps
282mode "$mode_gaps" {
283 bindsym 0 gaps inner current set 0;\
284 gaps outer current set 0;\
285 gaps top current set 0;\
286 gaps bottom current set 0;
287 bindsym 1 gaps inner current set $inner_gap;\
288 gaps outer current set $outer_gap;\
289 gaps top current set $top_gap;\
290 gaps bottom current set $bottom_gap;
291 bindsym 2 gaps inner current set 0;\
292 gaps outer current set 0;
293 bindsym 3 gaps inner current set $inner_gap;\
294 gaps outer current set -$inner_gap;
295 bindsym 4 gaps inner current set 0;\
296 gaps outer current set $inner_gap;\
297 gaps outer current plus $outer_gap;\
298 gaps top current set $top_gap;\
299 gaps bottom current set $bottom_gap;
300
301 bindsym h gaps horizontal current minus $gaps_inc
302 bindsym j gaps vertical current plus $gaps_inc
303 bindsym k gaps vertical current minus $gaps_inc
304 bindsym l gaps horizontal current plus $gaps_inc
305
306 bindsym Shift+h gaps horizontal current minus 1
307 bindsym Shift+j gaps vertical current plus 1
308 bindsym Shift+k gaps vertical current minus 1
309 bindsym Shift+l gaps horizontal current plus 1
310
311 bindsym equal gaps inner current plus $gaps_inc
312 bindsym minus gaps inner current minus $gaps_inc
313 bindsym Shift+equal gaps inner current plus 1
314 bindsym Shift+minus gaps inner current minus 1
315
316 bindsym Return mode "default"; exec notify-send "default"
317 bindsym Escape mode "default"; exec notify-send "default"
318 bindsym $mod+Shift+g mode "default"; exec notify-send "default"
319}
320bindsym $mod+Shift+g mode "$mode_gaps"; exec notify-send "Gaps | h/j/k/l/-/+ | 0 1 2 3 4"
321
322set $mode_system system
323mode "$mode_system" {
324 bindsym l exec loginctl lock-session, mode "default"; exec notify-send "lock"
325 bindsym e exec @wmmsg@ exit, mode "default"; exec notify-send "exit"
326 bindsym s exec systemctl suspend, mode "default"; exec notify-send "suspend"
327 bindsym h exec systemctl hibernate, mode "default"; exec notify-send "hibernate"
328 bindsym r exec systemctl reboot, mode "default"; exec notify-send "reboot"
329 bindsym p exec systemctl poweroff -i, mode "default"; exec notify-send "poweroff"
330 bindsym u exec systemctl reboot --firmware-setup, mode "default"; exec notify-send "uefi/bios"
331 bindsym Shift+s exec systemctl suspend-then-hibernate, mode "default"; exec notify-send "suspend then hibernate"
332 bindsym Return mode "default"; exec notify-send "default"
333 bindsym Escape mode "default"; exec notify-send "default"
334}
335bindsym $mod+x mode "$mode_system"; exec notify-send "System | l/e/s/h/r/p/u/S"
336
337bindsym @locked@ $mod+equal $volume_inc
338bindsym @locked@ $mod+minus $volume_dec
339bindsym @locked@ $mod+Shift+equal $volume_inc_1
340bindsym @locked@ $mod+Shift+minus $volume_dec_1
341bindsym @locked@ $mod+Control+equal $volume_inc_5
342bindsym @locked@ $mod+Control+minus $volume_dec_5
343
344bindsym $mod+y exec $SCRIPT_DIR/cycle_sink.sh && st pulse -t 500
345bindsym $mod+Shift+y exec $SCRIPT_DIR/cycle_sink.sh back && st pulse -t 500
346bindsym $mod+n $volume_mute
347bindsym $mod+Shift+n $volume_mic_mute
348
349set $mode_control_backlight control_backlight
350mode "$mode_control_backlight" {
351 bindsym minus $backlight_dec
352 bindsym equal $backlight_inc
353 bindsym Shift+equal $backlight_inc_1
354 bindsym Shift+minus $backlight_dec_1
355 bindsym Control+equal $backlight_inc_5
356 bindsym Control+minus $backlight_dec_5
357
358 bindsym Return mode "default"; exec notify-send "default"
359 bindsym Escape mode "default"; exec notify-send "default"
360}
361
362set $mode_control_dwt control_dwt
363mode "$mode_control_dwt" {
364 bindsym e input type:touchpad dwt enabled; mode "default"; exec notify-send "enabled"
365 bindsym d input type:touchpad dwt disabled; mode "default"; exec notify-send "disabled"
366
367 bindsym Return mode "default"; exec notify-send "default"
368 bindsym Escape mode "default"; exec notify-send "default"
369}
370
371set $mode_control control
372mode "$mode_control" {
373 bindsym b mode "$mode_control_backlight"; exec notify-send "Control backlight | -/+"
374 bindsym t mode "$mode_control_dwt"; exec notify-send "Control DWT | (e)nabled (d)isabled"
375 bindsym d exec $SCRIPT_DIR/dpms_off.sh; exec notify-send "DPMS Off"; mode "default"
376
377 bindsym Return mode "default"; exec notify-send "default"
378 bindsym Escape mode "default"; exec notify-send "default"
379}
380bindsym $mod+c mode "$mode_control"; exec notify-send "Control v(V)/p/b/B/t/d/n/a"
381
382bindsym $mod+b exec $browser
383bindsym $mod+Shift+b exec $browser -P secondary
384bindsym $mod+Control+b exec $browser -private-window
385
386bindsym $mod+apostrophe exec rofimoji --selector @rofi@ --selector-args=-i --skin-tone neutral --prompt "" -a copy
387
388bindsym $mod+semicolon exec $SCRIPT_DIR/bluetooth_device.sh
389bindsym $mod+Shift+semicolon exec $SCRIPT_DIR/bluetooth_device.sh disconnect
390bindsym $mod+Control+semicolon exec $SCRIPT_DIR/wifi.sh
391
392bindsym $mod+p exec @displays@
393
394focus_on_window_activation smart