# https://i3wm.org/docs/userguide.html
# mark scratchpad output
set $mod Mod4
floating_modifier $mod
tiling_drag modifier
font pango:monospace 18
#set $key xdotool key --clearmodifiers --delay 0
#bindsym --release $mod+BackSpace exec $key Control+BackSpace
# XXX: https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
exec_always --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork -e -c 111111
bindsym Print exec --no-startup-id loginctl lock-session
bindsym $mod+Print exec --no-startup-id systemctl suspend
bindsym $mod+Shift+Print exec --no-startup-id systemctl hibernate
# i3-msg exit
# systemctl reboot
# systemctl poweroff -i
exec_always --no-startup-id nm-applet
exec_always --no-startup-id fcitx5 -Dr
exec_always --no-startup-id dunst
bindsym $mod+BackSpace exec dunstctl close-all
bindsym $mod+Shift+BackSpace exec dunstctl history-pop
#bindsym $mod+0 exec --no-startup-id redshift -x
#bindsym $mod+minus exec --no-startup-id redshift -O 5000
#bindsym $mod+equal exec --no-startup-id redshift -O 6500 -g 1:1.25:1.33
#exec_always --no-startup-id killall -9 redshift; redshift -rP -l 34.414595:-119.860418 -t 6500:4000
#bindsym XF86LaunchA exec --no-startup-id killall -USR1 redshift
bindsym XF86LaunchA exec --no-startup-id redshift -PO4000
bindsym Shift+XF86LaunchA exec --no-startup-id redshift -x
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 1
bindsym XF86MonBrightnessDown exec --no-startup-id light -U 1
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
bindsym $mod+t exec xterm
for_window [class="modal"] floating enable, fullscreen enable
bindsym $mod+Shift+t exec realvnc
for_window [class="realvnc-vncviewer"] floating enable
bindsym $mod+d exec "rofi -modi drun,run -show drun"
bindsym --release $mod+c exec maim -so ~/shot-$(date +%s).png
bindsym --release $mod+Shift+c exec maim ~/shot-$(date +%s).png
bindsym $mod+g exec firefox
bindsym $mod+Shift+g exec firefox --private-window
for_window [window_role="alert"] floating enable, border none, sticky enable
no_focus [window_role="alert"]
bindsym $mod+u exec mpv /dev/video0 --profile=low-latency --untimed
for_window [title="video0 - mpv"] floating enable, border none, sticky enable, move position 1890 60
bindsym $mod+Shift+w kill
bindsym $mod+x [urgent=latest] focus
bindsym $mod+semicolon focus parent
bindsym $mod+apostrophe focus child
bindsym $mod+comma focus output left
bindsym $mod+period focus output right
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
bindsym $mod+Shift+comma move to output left
bindsym $mod+Shift+period move to output right
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
bindsym $mod+b split horizontal
bindsym $mod+v split vertical
bindsym $mod+Shift+backslash split horizontal
bindsym $mod+Shift+s split vertical
mode "S" {
bindsym h resize shrink width 4 px or 4 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 4 px or 4 ppt
bindsym Left resize shrink width 4 px or 4 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 4 px or 4 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+s mode "default"
}
bindsym $mod+s mode "S"
bindsym $mod+Return fullscreen toggle
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+f fullscreen toggle global
bindsym $mod+p focus mode_toggle
bindsym $mod+Shift+p floating toggle
bindsym $mod+q layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
for_window [title="^\[1] "] move container to workspace number $ws1
for_window [title="^\[2] "] move container to workspace number $ws2
for_window [title="^\[3] "] move container to workspace number $ws3
for_window [title="^\[4] "] move container to workspace number $ws4
for_window [title="^\[5] "] move container to workspace number $ws5
for_window [title="^\[6] "] move container to workspace number $ws6
for_window [title="^\[7] "] move container to workspace number $ws7
for_window [title="^\[8] "] move container to workspace number $ws8
for_window [title="^\[9] "] move container to workspace number $ws9
bindsym $mod+bracketleft workspace prev
bindsym $mod+bracketright workspace next
bindsym $mod+Shift+bracketleft move to workspace prev
bindsym $mod+Shift+bracketright move to workspace next
bindsym $mod+Tab workspace back_and_forth
bindsym $mod+Shift+Tab move to workspace back_and_forth
bindsym $mod+r reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+q exec "i3-nagbar -f 'pango:monospace 24' -t warning -m 'You pressed the quit shortcut. Do you really want to quit i3? This will end your X session.' -B 'Yes, quit i3' 'i3-msg exit'"
bar {
status_command i3status
padding 0 16
}
title_align center
hide_edge_borders vertical