@ -1,6 +1,7 @@
# vim: fdm=indent ft=i3.tmpl
# vim: fdm=marker ft=i3.go-template
# startup [[[ #
# startup #
set $ browser "firefox"
set $ browser "firefox"
# set $ browser "chromium"
# set $ browser "chromium"
set $ term "urxvt"
set $ term "urxvt"
@ -24,12 +25,16 @@
# exec --no-startup-id i3-msg 'workspace $ ws11 ; exec $ swex '
# exec --no-startup-id i3-msg 'workspace $ ws11 ; exec $ swex '
exec_always --no-startup-id numlockx on
exec_always --no-startup-id numlockx on
bindsym control+Return exec $ term
# applications #
# ]]] startup #
# applications [[[ #
set $ mod Mod1
set $ mod Mod1
set $ sch_dir " $ HOME /Documents/School"
set $ sch_dir " $ HOME /Documents/School"
# app shortcuts #
# app shortcuts [[[ #
bindsym control+Return exec $ term
# PROTIP: You can also dynamically set dmenu's colors this way:
# PROTIP: You can also dynamically set dmenu's colors this way:
bindsym Mod4+Return exec dmenu_run -nb " $ fg " -nf " $ bg " -sb " $ bg " -sf " $ fg "
bindsym Mod4+Return exec dmenu_run -nb " $ fg " -nf " $ bg " -sb " $ bg " -sf " $ fg "
# bindsym Mod4+Return exec dmenu_run
# bindsym Mod4+Return exec dmenu_run
@ -54,16 +59,13 @@ bindsym control+Return exec $term
bindsym Mod4+q exec qdirstat
bindsym Mod4+q exec qdirstat
bindsym Mod4+r exec urxvt -e ranger
bindsym Mod4+r exec urxvt -e ranger
bindsym Mod4+ $ mod +r exec notify-send "watson restart" "$(watson restart)"
bindsym Mod4+ $ mod +r exec notify-send "watson restart" "$(watson restart)"
bindsym control+ $ mod +s exec systemctl suspend
# bindsym Mod4+t exec st
# bindsym Mod4+t exec st
bindsym Mod4+ $ mod +t exec xclip -selection clipboard ~/.password-store/social/trapbot
bindsym Mod4+ $ mod +t exec xclip -selection clipboard ~/.password-store/social/trapbot
bindsym Mod4+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard
bindsym Mod4+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard
bindsym Mod4+ $ mod +u exec pass -c uoft/acorn
bindsym Mod4+ $ mod +u exec pass -c uoft/acorn
bindsym Mod4+w exec notify-send "watson status" "$(watson status)"
bindsym Mod4+w exec notify-send "watson status" "$(watson status)"
bindsym Mod4+ $ mod +w exec notify-send "watson stop" "$(watson status && watson stop)"
bindsym Mod4+ $ mod +w exec notify-send "watson stop" "$(watson status && watson stop)"
{{ if eq .chezmoi.fullHostname "nzxt" }}
bindsym control+ $ mod +w exec urxvt -e nvim /home/kevin/.config/watson/state.tmp
{{ end }}
bindsym control+Mod4+w exec urxvt -e nvim /home/kevin/.config/watson/state.tmp
# bindsym Mod4+x exec $ swex
# bindsym Mod4+x exec $ swex
bindsym Mod4+x exec xmodmap ~/.Xmodmap && xset r rate $ XSET_DELAY $ XSET_RATE
bindsym Mod4+x exec xmodmap ~/.Xmodmap && xset r rate $ XSET_DELAY $ XSET_RATE
bindsym Mod4+z exec cliqz
bindsym Mod4+z exec cliqz
@ -74,16 +76,21 @@ bindsym control+Return exec $term
bindsym Print --release exec "scrot -s /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
bindsym Print --release exec "scrot -s /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
bindsym control+Print --release exec "scrot -u /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
bindsym control+Print --release exec "scrot -u /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
{{ end }}
{{ end }}
# app shortcuts #
# ]]] app shortcuts #
# redshift [[[ #
bindsym $ mod +Mod4+1 exec redshift -x && redshift -O 1100
bindsym $ mod +Mod4+1 exec redshift -x && redshift -O 1100
# redshift #
bindsym $ mod +Mod4+2 exec redshift -x && redshift -O 2000
bindsym $ mod +Mod4+2 exec redshift -x && redshift -O 2000
bindsym $ mod +Mod4+3 exec redshift -x && redshift -O 3000
bindsym $ mod +Mod4+3 exec redshift -x && redshift -O 3000
bindsym $ mod +Mod4+4 exec redshift -x && redshift -O 4000
bindsym $ mod +Mod4+4 exec redshift -x && redshift -O 4000
bindsym $ mod +Mod4+5 exec redshift -x && redshift -O 5000
bindsym $ mod +Mod4+5 exec redshift -x && redshift -O 5000
bindsym $ mod +Mod4+grave exec redshift -x
bindsym $ mod +Mod4+grave exec redshift -x
# redshift #
# ]]] redshift #
# backlight [[[ #
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
bindsym Shift+F1 exec xbacklight -set 10
bindsym Shift+F1 exec xbacklight -set 10
@ -104,13 +111,94 @@ bindsym control+Return exec $term
bindsym $ mod +q exec sudo systemctl stop netctl-auto@wlp3s0.service
bindsym $ mod +q exec sudo systemctl stop netctl-auto@wlp3s0.service
{{ end }}
{{ end }}
# ]]] backlight #
for_window [class="Peek"] floating enable
# ]]] applications #
# container display [[[ #
# Font for window titles
font pango: $ sb_font 11
bindsym $ mod +s layout stacking
# change container layout (stacked, tabbed, toggle split)
bindsym $ mod +t layout tabbed
bindsym $ mod +e layout toggle split
# enter fullscreen mode for the focused container
bindsym $ mod +f fullscreen toggle
# toggle tiling /floating
bindsym $ mod +Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $ mod +space focus mode_toggle
# focus the parent container
bindsym $ mod +a focus parent
# focus the child container
#bindsym $ mod + d focus child
# gaps [[[ #
for_window [class="^.*"] border pixel 3
set $ inner_gaps 40
set $ outer_gaps 0
# remove window titlebars
# for_window [class="^.*"] border pixel 1
# gaps inner $ inner_gaps
# gaps outer $ outer_gaps
# gaps bottom 0
gaps inner 0
gaps outer 0
# other gaps [[[ #
# gaps horizontal 20
# gaps vertical 10
# gaps top
# gaps left 20
# gaps right 20
# gaps bottom
# ]]] other gaps #
bindsym control+shift+plus gaps inner all set $ inner_gaps ;gaps outer all set $ outer_gaps
bindsym control+shift+0 gaps inner all set 0;gaps outer all set 0
# ]]] gaps #
# colors from pywal [[[ #
set_from_resource $ fg i3wm.color7 #f 0 f0f0
# Set colors from Xresources
# Change 'color7' and 'color2' to whatever colors you want i3 to use
# from the generated scheme.
# NOTE: The ' #f 0 f0f0 ' in the lines below is the color i3 will use if
# it fails to get colors from Xresources.
set_from_resource $ bg i3wm.color2 #f 0 f0f0
# class border backgr. text indicator child_border
client.focused $ bg $ bg $ fg $ bg $ bg
# client.unfocused $ fg $ bg $ fg $ bg $ fg
# client.urgent $ bg $ bg $ fg $ bg $ bg
# client.placeholder $ bg $ bg $ fg $ bg $ bg
# client.background $ bg
# ]]] colors from pywal #
# ]]] container display #
# moving windows [[[ #
# Use Mouse+ $ mod to drag floating windows to their wanted position
# Use Mouse+ $ mod to drag floating windows to their wanted position
floating_modifier $ mod
floating_modifier $ mod
for_window [class="Peek"] floating enable
# changing/focusing/moving windows #
bindsym control+h focus left
# change focus
# change focus
bindsym control+h focus left
bindsym control+j focus down
bindsym control+j focus down
bindsym control+k focus up
bindsym control+k focus up
bindsym control+l focus right
bindsym control+l focus right
@ -119,24 +207,12 @@ bindsym control+h focus left
bindsym $ mod +minus move workspace to output left
bindsym $ mod +minus move workspace to output left
bindsym $ mod +plus move workspace to output right
bindsym $ mod +plus move workspace to output right
# alternatively, you can use the cursor keys:
bindsym $ mod +Left focus left
bindsym $ mod +Down focus down
bindsym $ mod +Up focus up
bindsym $ mod +Right focus right
# move focused window
# move focused window
bindsym control+Shift+h move left
bindsym control+Shift+h move left
bindsym control+Shift+j move down
bindsym control+Shift+j move down
bindsym control+Shift+k move up
bindsym control+Shift+k move up
bindsym control+Shift+l move right
bindsym control+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $ mod +Shift+Left move left
bindsym $ mod +Shift+Down move down
bindsym $ mod +Shift+Up move up
bindsym $ mod +Shift+Right move right
# split in horizontal orientation
# split in horizontal orientation
bindsym $ mod +b split h
bindsym $ mod +b split h
bindsym Mod4+ $ mod +b split h; exec $ term
bindsym Mod4+ $ mod +b split h; exec $ term
@ -145,11 +221,19 @@ bindsym control+h focus left
bindsym $ mod +v split v
bindsym $ mod +v split v
bindsym Mod4+ $ mod +v split v; exec $ term
bindsym Mod4+ $ mod +v split v; exec $ term
# resizing windows #
bindsym $ mod +control+h resize grow width 5 px or 5 ppt
bindsym $ mod +control+k resize grow height 5 px or 5 ppt
bindsym $ mod +control+j resize shrink height 5 px or 5 ppt
bindsym $ mod +control+l resize shrink width 5 px or 5 ppt
# bindsym control+Shift+x kill
# bindsym control+Shift+x kill
bindsym shift+x kill
bindsym shift+x kill
# changing/focusing/moving windows #
# backgrounds
# ]]] moving windows #
# backgrounds [[[ #
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
bindsym control+ $ mod +q exec wal -i " $ HOME /Pictures/Backgrounds/bright/editing"; exec ~/.cache/wal/colors.sh
bindsym control+ $ mod +q exec wal -i " $ HOME /Pictures/Backgrounds/bright/editing"; exec ~/.cache/wal/colors.sh
bindsym control+ $ mod +w exec /home/kevin/linux-config/scripts/bg-chooser; exec ~/.cache/wal/colors.sh
bindsym control+ $ mod +w exec /home/kevin/linux-config/scripts/bg-chooser; exec ~/.cache/wal/colors.sh
@ -163,47 +247,11 @@ bindsym control+h focus left
bindsym $ mod +r exec wal -i $( $ scripts_path /shuffler " $ HOME /Pictures/Backgrounds/dim/editing")
bindsym $ mod +r exec wal -i $( $ scripts_path /shuffler " $ HOME /Pictures/Backgrounds/dim/editing")
bindsym $ mod +y exec wal -i $( $ scripts_path /shuffler " $ HOME /Pictures/Backgrounds/bright/non-editing")
bindsym $ mod +y exec wal -i $( $ scripts_path /shuffler " $ HOME /Pictures/Backgrounds/bright/non-editing")
{{ end }}
{{ end }}
# backgrounds
# container display #
bindsym $ mod +s layout stacking
# change container layout (stacked, tabbed, toggle split)
bindsym $ mod +t layout tabbed
bindsym $ mod +e layout toggle split
# enter fullscreen mode for the focused container
bindsym $ mod +f fullscreen toggle
# toggle tiling /floating
bindsym $ mod +Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $ mod +space focus mode_toggle
# focus the parent container
bindsym $ mod +a focus parent
# focus the child container
#bindsym $ mod + d focus child
# container display #
# change container colors from pywal #
set_from_resource $ fg i3wm.color7 #f 0 f0f0
# Set colors from Xresources
# Change 'color7' and 'color2' to whatever colors you want i3 to use
# from the generated scheme.
# NOTE: The ' #f 0 f0f0 ' in the lines below is the color i3 will use if
# it fails to get colors from Xresources.
set_from_resource $ bg i3wm.color2 #f 0 f0f0
# ]]] backgrounds #
# class border backgr. text indicator child_border
client.focused $ bg $ bg $ fg $ bg $ bg
# client.unfocused $ fg $ bg $ fg $ bg $ fg
# client.urgent $ bg $ bg $ fg $ bg $ bg
# client.placeholder $ bg $ bg $ fg $ bg $ bg
# client.background $ bg
# change container colors from pywal #
# ws names [[[ #
# ws names #
set $ ws1 "1 "
set $ ws1 "1 "
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
set $ secondary "HDMI2"
set $ secondary "HDMI2"
@ -289,7 +337,10 @@ set $ws1 "1 "
set $ ws14 "14"
set $ ws14 "14"
set $ ws15 "15"
set $ ws15 "15"
# ws bindings #
# ]]] ws names #
# ws bindings [[[ #
bindsym $ mod +h workspace prev
bindsym $ mod +h workspace prev
bindsym $ mod +l workspace next
bindsym $ mod +l workspace next
@ -308,9 +359,9 @@ bindsym $mod+h workspace prev
# bindsym Mod4+3 workspace $ ws13
# bindsym Mod4+3 workspace $ ws13
# bindsym Mod4+4 workspace $ ws14
# bindsym Mod4+4 workspace $ ws14
# bindsym Mod4+5 workspace $ ws15
# bindsym Mod4+5 workspace $ ws15
# ws bindings #
# move container to ws #
# move container to ws [[[ #
bindsym $ mod +control+1 move container to workspace $ ws1 ; workspace $ ws1
bindsym $ mod +control+1 move container to workspace $ ws1 ; workspace $ ws1
bindsym $ mod +control+2 move container to workspace $ ws2 ; workspace $ ws2
bindsym $ mod +control+2 move container to workspace $ ws2 ; workspace $ ws2
bindsym $ mod +control+3 move container to workspace $ ws3 ; workspace $ ws3
bindsym $ mod +control+3 move container to workspace $ ws3 ; workspace $ ws3
@ -326,51 +377,29 @@ bindsym $mod+control+1 move container to workspace $ws1; workspace $ws1
bindsym $ mod +Shift+3 move container to workspace $ ws13 ; workspace $ ws13
bindsym $ mod +Shift+3 move container to workspace $ ws13 ; workspace $ ws13
bindsym $ mod +Shift+4 move container to workspace $ ws14 ; workspace $ ws14
bindsym $ mod +Shift+4 move container to workspace $ ws14 ; workspace $ ws14
bindsym $ mod +Shift+5 move container to workspace $ ws15 ; workspace $ ws15
bindsym $ mod +Shift+5 move container to workspace $ ws15 ; workspace $ ws15
# move container to ws #
# reload config/computer #
# ]]] move container to ws #
# ]]] ws bindings #
# reload config [[[ #
bindsym $ mod +control+r exec i3-msg restart
bindsym $ mod +control+r exec i3-msg restart
bindsym $ mod +Shift+c reload
bindsym $ mod +Shift+c reload
# bindsym $ mod +control+r reload
# bindsym $ mod +control+r reload
bindsym $ mod +control+u exec xrdb ~/.Xresources
bindsym $ mod +control+u exec xrdb ~/.Xresources
# exit i3 (logs you out of your X session)
# exit i3 (logs you out of your X session)
bindsym control+ $ mod +s exec systemctl suspend
bindsym $ mod +Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
bindsym $ mod +Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resizing windows #
bindsym $ mod +control+h resize grow width 5 px or 5 ppt
bindsym $ mod +control+k resize grow height 5 px or 5 ppt
bindsym $ mod +control+j resize shrink height 5 px or 5 ppt
bindsym $ mod +control+l resize shrink width 5 px or 5 ppt
# ]]] reload config #
# gaps #
for_window [class="^.*"] border pixel 3
set $ inner_gaps 40
set $ outer_gaps 0
# remove window titlebars
# for_window [class="^.*"] border pixel 1
# status bar [[[ #
# gaps inner $ inner_gaps
# gaps outer $ outer_gaps
# gaps bottom 0
gaps inner 0
gaps outer 0
# other gaps #
# bar vars [[[ #
# gaps horizontal 20
# gaps vertical 10
# gaps top
# gaps left 20
# gaps right 20
# gaps bottom
# other gaps #
bindsym control+shift+plus gaps inner all set $ inner_gaps ;gaps outer all set $ outer_gaps
bindsym control+shift+0 gaps inner all set 0;gaps outer all set 0
# status bar #
# set $ sb_font Hack NF Bold
# set $ sb_font Hack NF Bold
# set $ sb_font EmojiOne
# set $ sb_font EmojiOne
set $ sb_font DejaVuSansMono Nerd Font Mono Bold
set $ sb_font DejaVuSansMono Nerd Font Mono Bold
@ -388,10 +417,13 @@ set $sb_font DejaVuSansMono Nerd Font Mono Bold
set $ focused_ws_text #ffffff
set $ focused_ws_text #ffffff
# ]]] bar vars #
# main bar [[[ #
# set $ bar_trans 64
# set $ bar_trans 64
set $ bar_trans 00
set $ bar_trans 00
set $ main_ws_trans aa
set $ main_ws_trans aa
# main bar
bar {
bar {
i3bar_command i3bar -t
i3bar_command i3bar -t
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
@ -417,7 +449,10 @@ set $sb_font DejaVuSansMono Nerd Font Mono Bold
wheel_down_cmd nop
wheel_down_cmd nop
}
}
# sam bar
# ]]] main bar #
# secondary bar [[[ #
bar {
bar {
output $ secondary
output $ secondary
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
@ -435,13 +470,17 @@ set $sb_font DejaVuSansMono Nerd Font Mono Bold
active_workspace $ inactive_ws_bg $ fg $ active_ws_trans $ fg
active_workspace $ inactive_ws_bg $ fg $ active_ws_trans $ fg
inactive_workspace $ inactive_ws_bg $ inactive_ws_bg $ inactive_ws_trans $ fg
inactive_workspace $ inactive_ws_bg $ inactive_ws_bg $ inactive_ws_trans $ fg
}
}
# status_command i3blocks -c ~/.config/i3blocks/sam- i3blocks.conf
status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/i3blocks/sam-i3blocks.conf | tee /tmp/i3blocks-sam.out
status_command i3blocks -c ~/.config/i3blocks/i3blocks-secondary .conf
# status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/i3blocks/sam-i3blocks.conf | tee /tmp/i3blocks-sam.out
tray_output none
tray_output none
wheel_up_cmd nop
wheel_up_cmd nop
wheel_down_cmd nop
wheel_down_cmd nop
}
}
# # # display #
# ]]] secondary bar #
# display bar [[[ #
# bar {
# bar {
# i3bar_command i3bar -t
# i3bar_command i3bar -t
# font pango: $ sb_font 23
# font pango: $ sb_font 23
@ -451,23 +490,25 @@ set $sb_font DejaVuSansMono Nerd Font Mono Bold
# wheel_up_cmd nop
# wheel_up_cmd nop
# wheel_down_cmd nop
# wheel_down_cmd nop
# }
# }
# # display #
# status bar #
# Font for window titles
font pango: $ sb_font 11
# ]]] display bar #
# ]]] status bar #
# media keys [[[ #
# media keys #
# sink
bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
bindsym control+d exec ~/linux-config/scripts/change-sink dac
bindsym control+d exec ~/linux-config/scripts/change-sink dac
# bindsym control+shift+d exec ~/linux-config/scripts/change-sink dac2
# bindsym control+shift+d exec ~/linux-config/scripts/change-sink dac2
bindsym control+o exec ~/linux-config/scripts/change-sink line-out
bindsym control+o exec ~/linux-config/scripts/change-sink line-out
# media
bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks
bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks
# Media player controls
bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
# ]]] media keys #