-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig
652 lines (541 loc) · 21.8 KB
/
config
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
#------#
# TODO #
#------#
# switch to using termite + base16-manager
# idle inhibition: https://github.com/swaywm/sway/pull/3962
# mirror display (e.g., for live programming session in beamer mode, to have the laptop screen in EPFL mode)
# wait on https://github.com/swaywm/sway/issues/1666
# security
# screenshot active window
# disable pen when lid is closed (EPFL workplace)
# remote display (alternative to mirror display?)
# program launcher
#----------------------#
# X11 only, to replace #
#----------------------#
# Color theme for urxvt.
# Urxvt can read ~/.Xdefaults, but without a pre-processor.
exec xrdb -load ~/.Xresources
#--------#
# Inputs #
#--------#
# Custom layout defined in ~/.xkb/symbols/custom.
# Symlinked to /usr/share/X11/xkb/symbols/custom for X11.
# ESC, CAPS LOCK, and CTRL swapped by caps2esc from interception-tools.
# * ESC becomes CAPS LOCK
# * CAPS LOCK is ESC when pressed alone
# * CAPS LOCK is CTRL when key-chording
# Resources:
# * https://github.com/swaywm/sway/issues/719
# * https://github.com/alols/xcape/issues/67
# * https://aur.archlinux.org/packages/interception-caps2esc/
# Alternative (limitation: CAPS LOCK doesn't do ESC):
# * xkb_options caps:ctrl_modifier,shift:both_capslock
# Alternative (limitation: xcape doesn't work for wayland):
# * same xkb_options
# * exec xcape -e 'Caps_Lock=Escape'
# X11: /etc/X11/xorg.conf.d/00-keyboard.conf
# virtual console: /etc/vconsole.conf
input * {
xkb_model pc104
xkb_layout custom
xkb_variant symbolic
xkb_numlock enabled
natural_scroll enabled
}
# X11: /etc/X11/xorg.conf.d/30-touchpad.conf
input "1739:0:Synaptics_TM3075-002" {
scroll_method edge
tap enabled
pointer_accel 0.8
}
input "1133:4122:Logitech_Performance_MX" {
pointer_accel 0.8
}
input "1386:236:Wacom_ISDv4_EC_Pen" map_to_output eDP-1
input "1739:29252:SYNAPTICS_Synaptics_Touch_Digitizer_V04" map_to_output eDP-1
#---------------------#
# Basic configuration #
#---------------------#
set $mod Mod4
# Window borders and titles
default_border pixel 2
hide_edge_borders none
# Never move the mouse to the center of the screen.
mouse_warping none
# Font for window titles (and the bar).
#font pango:DejaVu Sans Mono 12
font pango:Inconsolata 14
# start a terminal
#set $shell exec termite -e fish
set $shell exec urxvt -e fish
bindsym $mod+Return $shell
set $urxvt_transparent exec urxvt -depth 32 -bg rgba:0000/2b00/3600/eeee
bindsym $mod+Shift+Return $urxvt_transparent -name "floating_urxvt" -e fish
for_window [class="URxvt" instance="floating_urxvt"] floating toggle
for_window [class="URxvt" instance="scratchpad_editor"] move scratchpad
bindsym $mod+minus scratchpad show
bindsym $mod+Shift+minus move scratchpad
# kill focused window
bindsym $mod+q kill
# start dmenu (a program launcher)
# bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec i3-dmenu-desktop
# reload the configuration file
bindsym $mod+Shift+r reload
#------------#
# Navigation #
#------------#
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+h focus left
#set $i3-vim-nav /home/michael/.config/vim/plugged/i3-vim-nav/i3-vim-nav
#bindsym --release $mod+j exec $i3-vim-nav j
#bindsym --release $mod+k exec $i3-vim-nav k
#bindsym --release $mod+l exec $i3-vim-nav l
#bindsym --release $mod+h exec $i3-vim-nav h
#set $i3-vim-focus /home/michael/.config/vim/plugged/i3-vim-focus/i3-vim-focus/target/release/i3-vim-focus
#bindsym $mod+j exec $i3-vim-focus down
#bindsym $mod+k exec $i3-vim-focus up
#bindsym $mod+l exec $i3-vim-focus right
#bindsym $mod+h exec $i3-vim-focus left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
bindsym $mod+Shift+h move left
# focus the parent / child container
bindsym $mod+p focus parent
bindsym $mod+c focus child
# jump to urgent window
bindsym $mod+x [urgent=latest] focus
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# toggle tiling / floating mode
bindsym $mod+Shift+space floating toggle
# $mod+MouseLeft to drag floating windows
# $mod+MouseRight to resize floating windows
floating_modifier $mod
#floating_maximum_size 800 x 800
#--------#
# Layout #
#--------#
# split in horizontal / vertical orientation
bindsym $mod+b split v
#bindsym $mod+Shift+v split v
bindsym $mod+v split h
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split
#------------#
# Workspaces #
#------------#
# TERM, CODE, READ, WEB, COM, FILES, MEDIA (audio, video, images), MON, MISC (gimp, inkscpae)
set $WS1 workspace 1: MISC
set $WS2 workspace 2: WEB
set $WS3 workspace 3: COM
set $WS4 workspace 4: MISC
set $WS5 workspace 5: MISC
set $WS6 workspace 6: BEAM
set $WS7 workspace 7: MON
set $WS8 workspace 8: MISC
set $WS9 workspace 9: MISC
set $WS10 workspace 10: MISC
bindsym $mod+1 $WS1
bindsym $mod+2 $WS2
bindsym $mod+3 $WS3
bindsym $mod+4 $WS4
bindsym $mod+5 $WS5
bindsym $mod+6 $WS6
bindsym $mod+7 $WS7
bindsym $mod+8 $WS8
bindsym $mod+9 $WS9
bindsym $mod+0 $WS10
bindsym $mod+Shift+1 move container to $WS1
bindsym $mod+Shift+2 move container to $WS2
bindsym $mod+Shift+3 move container to $WS3
bindsym $mod+Shift+4 move container to $WS4
bindsym $mod+Shift+5 move container to $WS5
bindsym $mod+Shift+6 move container to $WS6
bindsym $mod+Shift+7 move container to $WS7
bindsym $mod+Shift+8 move container to $WS8
bindsym $mod+Shift+9 move container to $WS9
bindsym $mod+Shift+0 move container to $WS10
# move current workspace to next output
bindsym $mod+Shift+m move workspace to output right
#------------------------------#
# Actions for specific windows #
#------------------------------#
# No border (title bar) for browser.
#for_window [class="Firefox"] border none
# Slides on beamer.
for_window [title="pdfpc - presentation .*"] move container to $WS6
#for_window [app_id="pdfpc"] move container to $WS6
#assign [class="Pdfpc" window_role="presentation"] workspace $WS6
# Tor browser window shouldn't be resized.
# Default resolution of 1000 x 1000 should be kept for anonymity.
for_window [class="Tor Browser"] floating enable
#for_window [class="Tor Browser"] floating enable resize set width 1004 px height 1102 px
# When opening windows initially.
for_window [app_id="firefox"] layout tabbed
for_window [app_id="thunderbird"] layout tabbed
#for_window [title="htop"] layout splitv
#-------------#
# Color theme #
#-------------#
# Solarized common
set $yellow #b58900
set $orange #cb4b16
set $red #dc322f
set $magenta #d33682
set $violet #6c71c4
set $blue #268bd2
set $cyan #2aa198
set $green #859900
# Solarized dark
set $basez3 #002b36
set $basez2 #073642
set $basez1 #586e75
set $basez0 #657b83
set $base0 #839496
set $base1 #93a1a1
set $base2 #eee8d5
set $base3 #fdf6e3
# Screen color when no application are open.
#output * background $basez3 solid_color
#output * background black_hole.png fill
# class border backgr. text indicator child_border
client.focused $basez1 $basez1 $base1 $basez1 $basez1
client.focused_inactive $basez2 $basez2 $basez1 $basez2 $basez2
client.unfocused $basez2 $basez2 $basez1 $basez2 $basez2
client.urgent $red $red $base3 $red $red
#client.placeholder #000000 #0c0c0c #ffffff #000000
#client.background #ffffff
#------------#
# Status bar #
#------------#
bar {
# position top
status_command i3status
colors {
background $basez3
statusline $basez0
separator $basez0
focused_workspace $basez1 $basez1 $base1
active_workspace $basez1 $basez1 $base1
inactive_workspace $basez2 $basez2 $basez1
urgent_workspace $red $red $base3
}
}
#--------------#
# Mode: resize #
#--------------#
# resize window (you can also use the mouse for that)
mode "resize" {
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#-----------------#
# Mode: workplace #
#-----------------#
# Pen sometimes clicks when lid is closed.
set $pen_on input "1386:236:Wacom_ISDv4_EC_Pen" events enabled
set $pen_off input "1386:236:Wacom_ISDv4_EC_Pen" events disabled
# To set brightness on external monitors through /sys/class/backlight/.
# Let some time for the monitor to turn on.
set $ddc_on exec sleep 20 && sudo modprobe ddcci
set $ddc_off exec sudo modprobe -r ddcci_backlight ddcci
# Call true to exit with 0 and run swayidle even when no process were killed.
set $dpms_on exec pkill swayidle || true && swayidle -w \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"'
# Auto-lock is painful. I prefer to lock explicitly. Same as auto-sleep.
# timeout 300 'swaylock' \
# Suspend happens before lock. The screen is seen on wakeup while it's being locked.
# before-sleep 'swaylock'
# On by default.
$dpms_on
# It's a pain when screen turns off during presentation or TV.
set $dpms_off exec pkill swayidle
set $laptop move workspace to output eDP-1
set $ext1 move workspace to output HDMI-A-2 # mini-HDMI on the side
set $ext2 move workspace to output DP-1 # HDMI on docking station
set $mode_workplace Workplace: (l) laptop, (b,B) beamer, (h) home, (e) EPFL
bindsym $mod+w mode "$mode_workplace"
mode "$mode_workplace" {
bindsym l \
output eDP-1 enable res 1920x1080, \
output DP-1 disable, \
output HDMI-A-2 disable, \
$pen_on, \
$dpms_on, \
$ddc_off, \
mode "default"
bindsym h \
output eDP-1 enable res 1920x1080 pos 0 1080, \
output HDMI-A-2 enable res 1920x1080 pos 0 0, \
$pen_on, \
$dpms_on, \
$ddc_on, \
$WS10,$ext1, $WS9,$ext1, $WS8,$ext1, $WS7,$laptop, $WS6,$laptop, \
$WS5,$ext1, $WS4,$ext1, $WS3,$ext1, $WS2,$ext1, $WS1,$ext1, \
mode "default"
# TODO: DP-1 or HDMI-A-2 should mirror eDP-1
# We otherwise don't have any screen left when disconnecting dock.
bindsym e \
output eDP-1 enable res 1920x1080 pos 3840 0, \
output DP-1 enable res 1920x1080 pos 0 0, \
output HDMI-A-2 enable res 1920x1080 pos 1920 0, \
$pen_off, \
$dpms_on, \
$ddc_on, \
$WS10,$ext1, $WS9,$ext1, $WS8,$ext1, $WS7,$ext2, $WS6,$ext1, \
$WS5,$ext1, $WS4,$ext1, $WS3,$ext2, $WS2,$ext2, $WS1,$ext1, \
mode "default"
bindsym b \
output eDP-1 enable res 1920x1080 pos 0 0, \
output DP-1 disable, \
output HDMI-A-2 enable pos 1920 0, \
$pen_on, \
$dpms_off, \
$ddc_off, \
$WS10,$laptop, $WS9,$laptop, $WS8,$laptop, $WS7,$laptop, $WS6,$ext1, \
$WS5,$laptop, $WS4,$laptop, $WS3,$laptop, $WS2,$laptop, $WS1,$laptop, \
mode "default"
# bindsym Shift+b \
# output eDP-1 enable res 1920x1080, \
# output DP-1 disable, \
# output HDMI-A-2 enable mirror eDP-1, \
# $pen_on, \
# $dpms_off, \
# $ddc_off, \
# mode "default"
bindsym Escape mode "default"
}
#-------------------------#
# Mode: network selection #
#-------------------------#
set $net_start exec sudo netctl start
set $net_stop exec sudo netctl stop
set $net_stop_all exec sudo netctl stop-all, \
exec sudo resolvconf -d '*.*', \
exec dbus-send --system --type=method_call \
--dest=org.bluez /org/bluez/hci0/dev_58_24_29_79_4E_8A \
org.bluez.Network1.Disconnect
# exec sudo hciconfig hci0 down
# rfkill
# sudo hciconfig hci0 up &&
set $bluetooth exec dbus-send --system --type=method_call \
--dest=org.bluez /org/bluez/hci0/dev_58_24_29_79_4E_8A \
org.bluez.Network1.Connect string:'nap' && \
sleep 2 && sudo netctl start bphone
# set $vpn_start exec sudo systemctl start vpn_epfl
# set $vpn_stop exec sudo systemctl stop vpn_epfl
set $tunnels exec tunnels restart
set $mode_network Network: (e,E,r) epfl, (h,H) home, (p,P) phone, (d) DHCP, (n) none, (t) tunnels, (v,V) VPN
bindsym $mod+n mode "$mode_network"
mode "$mode_network" {
bindsym e $net_start wepfl_ttls, mode "default"
bindsym r $net_start weduroam_ttls, mode "default"
bindsym Shift+e $net_start eepfl, mode "default"
bindsym h $net_start whome, mode "default"
bindsym Shift+h $net_start ehome, mode "default"
bindsym p $bluetooth, mode "default"
bindsym Shift+p $net_start wphone, mode "default"
bindsym d $net_start edhcp, mode "default"
bindsym n $net_stop_all, mode "default"
bindsym t $tunnels, mode "default"
bindsym v $net_start vepfl, mode "default"
bindsym Shift+v $net_stop vepfl, mode "default"
bindsym Escape mode "default"
}
#------------------#
# Power management #
#------------------#
set $mode_system System: (l) lock, (e) exit, (s) suspend, (h) hibernate, (r) reboot, (o) power-off
bindsym $mod+Escape mode "$mode_system"
mode "$mode_system" {
bindsym l exec swaylock, mode "default"
bindsym e exit
bindsym s exec swaylock && systemctl suspend, mode "default"
bindsym h exec swaylock && systemctl hibernate, mode "default"
bindsym r exec systemctl reboot
bindsym o exec systemctl poweroff
bindsym Escape mode "default"
}
#-------------------------#
# Mode: mount filesystems #
#-------------------------#
set $mount exec mount
set $umount exec umount
# Will be able to use umount with next version of util-linux.
# https://github.com/libfuse/libfuse/issues/246
set $fumount exec fusermount -u
set $mode_fs_mount FS mount: u (USB key), s (SD card), p (phone), v (VPS at OVH), l (LTS2 NAS), c (CDK NAS)
set $mode_fs_umount FS umount: u (USB key), s (SD card), p (phone), v (VPS at OVH), l (LTS2 NAS), c (CDK NAS)
bindsym $mod+d mode "$mode_fs_mount"
bindsym $mod+Shift+d mode "$mode_fs_umount"
mode "$mode_fs_mount" {
bindsym u $mount /mnt/usb, mode "default"
bindsym s $mount /mnt/sdcard, mode "default"
bindsym p $mount /mnt/phone, mode "default"
bindsym v $mount /mnt/vps, mode "default"
bindsym l $mount /mnt/lts2, mode "default"
bindsym c $mount /mnt/cdk, mode "default"
bindsym Escape mode "default"
}
mode "$mode_fs_umount" {
bindsym p $fumount /mnt/phone, mode "default"
bindsym u $umount /mnt/usb, mode "default"
bindsym v $fumount /mnt/vps, mode "default"
bindsym s $umount /mnt/sdcard, mode "default"
bindsym l $umount /mnt/lts2, mode "default"
bindsym c $umount /mnt/cdk, mode "default"
bindsym Escape mode "default"
}
#-------------------------#
# Mode: open applications #
#-------------------------#
set $mode_open Programs: (I) init, (C) close all, (a,A,b,f,g,G,i,l,m,M,o,p,P,r,R,s,t,v,V,x,z)
bindsym $mod+o mode "$mode_open"
mode "$mode_open" {
bindsym a mode "$android_control"
bindsym Shift+a exec audacity, mode "default"
bindsym b exec blender, mode "default"
bindsym f exec firefox -P browsing, mode "default"
bindsym g exec gimp, mode "default"
bindsym Shift+g exec gephi, mode "default"
bindsym h exec urxvt -e htop, mode "default"
bindsym i exec inkscape, mode "default"
bindsym j exec jupyter-lab, mode "default"
bindsym l exec libreoffice, mode "default"
bindsym m exec urxvt -e ncmpcpp, mode "default"
bindsym Shift+m exec meshlab, mode "default"
bindsym o exec tor-browser, mode "default"
# bindsym p exec urxvt -e python -i -c "import numpy as np", mode "default"
bindsym p exec urxvt -e ipython --pylab --no-confirm-exit, mode "default"
# bindsym p exec urxvt -e jupyter console, mode "default"
bindsym Shift+p exec pavucontrol, mode "default"
bindsym r exec urxvt -e ranger /data, mode "default"
bindsym Shift+r exec rambox, mode "default"
bindsym s exec scribus, mode "default"
bindsym t exec thunderbird, mode "default"
bindsym v exec urxvt -e $EDITOR, mode "default"
bindsym Shift+v exec env QT_QPA_PLATFORM=xcb virtualbox, mode "default"
bindsym x exec xournalpp, mode "default"
bindsym z exec zoom, mode "default"
bindsym Escape mode "default"
bindsym Shift+c [title=".*"] kill, mode "default"
bindsym Shift+i \
$urxvt_transparent -name "scratchpad_editor" -e $EDITOR +start /data/notes/scratchpad.md, \
$WS7, exec urxvt -e journalctl -f, \
$WS3, exec rambox, exec thunderbird, \
$WS2, exec firefox -P browsing, \
mode "default"
}
set $android_control Android control: (t) TV TCP, (p) phone TCP, (P) phone USB
mode "$android_control" {
bindsym t exec android-control tv, mode "default"
bindsym p exec android-control phone, mode "default"
bindsym Shift+p exec android-control phone-usb, mode "default"
bindsym Escape mode "default"
}
#-------#
# Music #
#-------#
#set $mpc exec mpc -h SECRET
set $mpc exec mpc -h SECRET
set $mode_music Music: (p) previous, (n) next, (space) play / pause
bindsym $mod+m mode "$mode_music"
mode "$mode_music" {
bindsym space $mpc toggle, mode "default"
bindsym n $mpc next, mode "default"
bindsym p $mpc prev, mode "default"
bindsym Escape mode "default"
}
bindsym XF86AudioNext $mpc next
bindsym XF86AudioPrev $mpc prev
bindsym XF86AudioPlay $mpc toggle
bindsym XF86AudioStop $mpc toggle
#---------------#
# Audio / sound #
#---------------#
set $mode_audio Audio sink/source: (l) laptop, (w) workstation, (h) HDMI, (b) Bluetooth
bindsym $mod+a mode "$mode_audio"
mode "$mode_audio" {
bindsym l exec pactl-move sink alsa_output.pci-0000_00_1b.0.analog-stereo, exec pactl-move source alsa_input.pci-0000_00_1b.0.analog-stereo, mode "default"
bindsym w exec pactl-move sink alsa_output.usb-C-Media_Electronics_Inc._ThinkPad_OneLink_Dock_USB_Audio-00.analog-stereo, exec pactl-move source alsa_input.usb-C-Media_Electronics_Inc._ThinkPad_OneLink_Dock_USB_Audio-00.analog-stereo, mode "default"
bindsym h exec pactl-move sink alsa_output.pci-0000_00_03.0.hdmi-stereo, mode "default"
bindsym b mode "$audio_bluetooth"
bindsym Escape mode "default"
}
set $btc exec bluetoothctl connect
set $btd exec bluetoothctl disconnect
set $audio_bluetooth Bluetooth devices: (s) speakers iCube 95 BT, (h) headset BT25 II, (c) CD400U (Orsonnens)
mode "$audio_bluetooth" {
bindsym s $btc "00:18:96:00:FF:A9", exec pactl-move sink bluez_sink.00_18_96_00_FF_A9.a2dp_sink, mode "default"
bindsym c $btc "04:FE:A1:55:A6:7A", exec pactl-move sink bluez_sink.04_FE_A1_55_A6_7A.a2dp_sink, mode "default"
bindsym h $btc "09:00:4B:00:12:08", exec pactl-move sink bluez_sink.09_00_4B_00_12_08.headset_head_unit, exec pactl-move source bluez_source.09_00_4B_00_12_08.headset_head_unit, mode "default"
bindsym Escape mode "default"
}
#bindsym XF86AudioRaiseVolume exec amixer set -D default:PCH Master 5%+
#bindsym XF86AudioLowerVolume exec amixer set -D default:PCH Master 5%-
#bindsym XF86AudioMute exec amixer set -D default:PCH Master toggle
#set $source alsa_input.pci-0000_00_1b.0.analog-stereo
set $source @DEFAULT_SOURCE@
#set $sink alsa_output.pci-0000_00_1b.0.analog-stereo
#set $sink $(pactl list short sinks | grep RUNNING | awk '{print $1}') # running source, might be none
set $sink @DEFAULT_SINK@
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $sink +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume $sink -5%
bindsym XF86AudioMute exec pactl set-sink-mute $sink toggle
bindsym XF86AudioMicMute exec pactl set-source-mute $source toggle
#-------------------#
# Screen brightness #
#-------------------#
set $mode_brightness Screen brightness: 1-10
bindsym $mod+Shift+b mode "$mode_brightness"
mode "$mode_brightness" {
bindsym 1 exec brightness 10%, mode "default"
bindsym 2 exec brightness 20%, mode "default"
bindsym 3 exec brightness 30%, mode "default"
bindsym 4 exec brightness 40%, mode "default"
bindsym 5 exec brightness 50%, mode "default"
bindsym 6 exec brightness 60%, mode "default"
bindsym 7 exec brightness 70%, mode "default"
bindsym 8 exec brightness 80%, mode "default"
bindsym 9 exec brightness 90%, mode "default"
bindsym 0 exec brightness 100%, mode "default"
bindsym Escape mode "default"
}
# Switched from xbacklight to light when changing DDX from xf86-video-intel to xf86-video-modesetting
# https://www.reddit.com/r/archlinux/comments/4cojj9/it_is_probably_time_to_ditch_xf86videointel/
# bindsym XF86MonBrightnessUp exec light -A 1
# bindsym XF86MonBrightnessDown exec light -U 1
bindsym XF86MonBrightnessUp exec brightness 1%+
bindsym XF86MonBrightnessDown exec brightness 1%-
#-------------#
# Screenshots #
#-------------#
set $filename /data/inputs/screenshots/$(date +'%Y%m%d_%H%M%S.png')
bindsym Print exec grim $filename
#bindsym Shift+Print exec scrot -u $filename
bindsym Control+Print exec grim -g "$(slurp)" $filename
#----------------------------------#
# Screen casting/recording/sharing #
#----------------------------------#
# Under Wayland, the screen is captured through Pipewire.
# Make environment variables available to xdg-desktop-portal.
# https://github.com/emersion/xdg-desktop-portal-wlr
exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP