Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

667 lines
25 KiB

6 years ago
5 years ago
2 years ago
1 year ago
6 years ago
6 years ago
6 years ago
4 years ago
5 years ago
5 years ago
5 years ago
6 years ago
5 years ago
5 years ago
5 years ago
2 years ago
2 years ago
4 years ago
5 years ago
6 years ago
5 years ago
  1. # startup [[[ #
  2. set $term kitty
  3. # set $term st
  4. # set $term_alt urxvt
  5. {{ if eq .chezmoi.hostname "x1-carbon" }}
  6. set $term urxvt
  7. # set $term_alt kitty
  8. set $term_alt st
  9. # set $term_alt urxvt
  10. exec dunst
  11. exec compton
  12. exec imwheel
  13. exec numlockx on
  14. exec xbacklight -set 10
  15. # exec wal -i "$(/home/kevin/scripts/shuffler \"/home/kevin/Pictures/Backgrounds/dim/non-editing\")"
  16. exec wal -i $(/home/kevin/scripts/shuffler "$HOME/Pictures/Backgrounds/dim/editing")
  17. {{ end }}
  18. # exec xrdb ~/.Xresources && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null
  19. # exec --no-startup-id i3-msg 'workspace $ws1; exec $term'
  20. # exec --no-startup-id i3-msg 'workspace $ws2; exec $term -e fish -c "tmux-attach fortnite"'
  21. exec --no-startup-id i3-msg 'workspace $ws3; exec $browser'
  22. # exec --no-startup-id i3-msg 'workspace $ws5; exec $term -e twitchy'
  23. # exec --no-startup-id i3-msg 'workspace $ws5; exec firefox -P nft'
  24. # exec --no-startup-id i3-msg workspace $ws6; exec discord
  25. # exec --no-startup-id i3-msg workspace $ws1; exec $term -e fish -c 'tmux-attach school'
  26. # ]]] startup #
  27. # applications [[[ #
  28. set $mod Mod1
  29. set $browser "firefox"
  30. set $browser_secondary "chromium"
  31. # set $browser "chromium"
  32. # set $browser_secondary "firefox"
  33. set $scripts_path "/home/kevin/scripts"
  34. set $sch_dir "$HOME/Documents/School"
  35. # app shortcuts [[[ #
  36. set $type_delay_cmd sleep .3
  37. bindsym Control+Return exec $term
  38. bindsym Control+Shift+Return exec st -A1
  39. bindsym Control+$mod+Return exec $term_alt
  40. # bindsym Control+$mod+Return exec st
  41. # PROTIP: You can also dynamically set dmenu's colors this way:
  42. bindsym Mod4+Return exec /home/kevin/scripts/dmenu-history -nb "$fg" -nf "$bg" -sb "$bg" -sf "$fg"
  43. # bindsym Mod4+Return exec dmenu_run -nb "$fg" -nf "$bg" -sb "$bg" -sf "$fg"
  44. # bindsym Mod4+Return exec dmenu_run
  45. # There also is the (new) i3-dmenu-desktop which only displays applications
  46. # shipping a .desktop file. It is a wrapper around dmenu, so you need that
  47. # installed.
  48. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
  49. # bindsym Mod4+b layout tabbed; exec zathura
  50. # bindsym Mod4+c exec $browser
  51. # bindsym Mod4+$mod+c exec chatterino
  52. bindsym Mod4+c exec chatterino
  53. bindsym Mod4+$mod+c exec $browser
  54. # bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)"
  55. # bindsym Mod4+e exec emacs
  56. # bindsym Mod4+e exec ~/scripts/twem
  57. # bindsym Mod4+f exec firefox
  58. # bindsym Mod4+f exec firefox --private-window
  59. # bindsym Mod4+f exec firefox --private-window google.ca
  60. # bindsym Mod4+$mod+f exec printf 'Kevin@fosstodon.org' | xclip -selection clipboard
  61. # bindsym Mod4+h exec sleep .2 && xdotool type '.hint'
  62. # bindsym Mod4+$mod+h exec $type_delay_cmd && xdotool type 'kevin.mok@live.ca'
  63. bindsym Mod4+h exec $type_delay_cmd && xdotool type 'kevin.mok@live.ca'
  64. # bindsym Mod4+$mod+h exec sleep .2 && xdotool type '.hint'
  65. bindsym Mod4+$mod+i exec sleep .2 && xdotool type '.info latest'
  66. bindsym Mod4+l exec ~/scripts/dmenu-twitch
  67. # bindsym Mod4+m exec $term -e ~/scripts/vim-man
  68. bindsym Mod4+m exec $type_delay_cmd && xdotool type 'me@kevin-mok.com'
  69. # bindsym Mod4+$mod+m exec pass -c uoft/markus
  70. bindsym Mod4+n exec $term -e nvim
  71. # bindsym Mod4+$mod+o exec xset dpms force off
  72. bindsym Mod4+o exec xclip -selection clipboard ~/.password-store/social/gmail && $type_delay_cmd && xdotool key 'Control_L+v'
  73. bindsym $mod+Mod4+o workspace $ws11; exec obs
  74. # bindsym Mod4+p workspace $ws4; exec pgadmin3
  75. # bindsym Mod4+p exec pycharm
  76. bindsym Mod4+p exec passmenu
  77. # # bindsym Mod4+p exec sleep .2 && xdotool type '.catch '
  78. # bindsym Mod4+$mod+p exec notify-send "ping" "$(ping -c 3 -W 1 8.8.8.8)"
  79. # bindsym Mod4+q exec qdirstat
  80. bindsym Mod4+q exec printf 'emad1 ' | xclip -selection clipboard && $type_delay_cmd && xdotool key 'Control_L+v'
  81. bindsym Mod4+r exec $type_delay_cmd && xdotool type 'kmok@redhat.com'
  82. bindsym Mod4+$mod+r exec pass show -c career/redhat && $type_delay_cmd && xdotool key 'Control_L+v'
  83. # bindsym Mod4+$mod+r exec $term -e ranger
  84. # bindsym Mod4+$mod+r exec notify-send "watson restart" "$(watson restart)"
  85. bindsym Mod4+$mod+s exec $type_delay_cmd && xdotool type 'https://smol.gq/'
  86. bindsym Mod4+$mod+t exec xclip -selection clipboard ~/.password-store/social/trapbot && $type_delay_cmd && xdotool key 'Control_L+v'
  87. bindsym Mod4+u exec $type_delay_cmd && xdotool type 'kevin.mok@mail.utoronto.ca'
  88. # bindsym Mod4+$mod+u exec pass -c uoft/acorn
  89. # bindsym Mod4+w exec notify-send "watson status" "$(watson status)"
  90. # bindsym Mod4+$mod+w exec notify-send "watson stop" "$(watson status && watson stop)"
  91. bindsym Control+Mod4+w exec $term -e nvim /home/kevin/.config/watson/state.tmp
  92. # bindsym Mod4+x exec $swex
  93. bindsym Control+$mod+x exec $type_delay_cmd && xdotool type 'http://codm.ataraxy.tk/'
  94. bindsym Mod4+z exec cliqz
  95. bindsym Pause exec ~/scripts/twem
  96. # screenshot [[[ #
  97. set $screenshot_folder "/home/kevin/Pictures/screenshots/desktop/unsorted"
  98. set $scripts_path "/home/kevin/scripts"
  99. {{ if .ext_kb }}
  100. # bindsym Mod4+x exec ~/scripts/xmodmap-custom
  101. bindsym Mod4+x exec notify-send "xmodmap" "$(~/scripts/xmodmap-custom)"
  102. # bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)"
  103. # bindsym Print --release exec "scrot -s $screenshot_folder/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
  104. bindsym Print --release exec "maim -su | tee ~/Pictures/screenshots/desktop/unsorted/screenshot-$(date +%F_%T).png | xclip -selection clipboard -t image/png"
  105. bindsym Control+Print --release exec "scrot -u ~/Pictures/screenshots/desktop/unsorted/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
  106. {{ else }}
  107. bindsym Mod4+x exec xmodmap ~/.Xmodmap-laptop && xset r rate $XSET_DELAY $XSET_RATE
  108. bindsym Control+p --release exec "scrot -s ~/tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
  109. bindsym Control+$mod+p --release exec "scrot -u ~/tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
  110. {{ end }}
  111. # ]]] screenshot #
  112. # ]]] app shortcuts #
  113. # redshift [[[ #
  114. bindsym $mod+Mod4+1 exec redshift -x && redshift -O 1100
  115. bindsym $mod+Mod4+2 exec redshift -x && redshift -O 2000
  116. bindsym $mod+Mod4+3 exec redshift -x && redshift -O 3000
  117. bindsym $mod+Mod4+4 exec redshift -x && redshift -O 4000
  118. bindsym $mod+Mod4+5 exec redshift -x && redshift -O 5000
  119. bindsym $mod+Mod4+grave exec redshift -x
  120. # ]]] redshift #
  121. # backlight [[[ #
  122. {{ if eq .chezmoi.hostname "x1-carbon" }}
  123. bindsym Shift+F1 exec xbacklight -set 10
  124. bindsym Shift+F2 exec xbacklight -set 20
  125. bindsym Shift+F3 exec xbacklight -set 30
  126. bindsym Shift+F4 exec xbacklight -set 40
  127. bindsym Shift+F5 exec xbacklight -set 50
  128. bindsym Shift+F6 exec xbacklight -set 60
  129. bindsym Shift+F7 exec xbacklight -set 70
  130. bindsym Shift+F8 exec xbacklight -set 80
  131. bindsym Shift+F9 exec xbacklight -set 90
  132. bindsym Shift+F10 exec xbacklight -set 100
  133. bindsym Control+$mod+plus exec xbacklight -inc 2
  134. bindsym Control+$mod+minus exec xbacklight -dec 2
  135. bindsym Control+$mod+w exec sudo systemctl start netctl-auto@wlp3s0.service
  136. bindsym Control+$mod+q exec sudo systemctl stop netctl-auto@wlp3s0.service
  137. {{ end }}
  138. # ]]] backlight #
  139. for_window [class="chatterino"] floating enable
  140. for_window [class="Peek"] floating enable
  141. for_window [title="Qalculate!"] floating enable
  142. # ]]] applications #
  143. # container display [[[ #
  144. # Font for window titles
  145. font pango:$sb_font 11
  146. bindsym $mod+s layout stacking
  147. # change container layout (stacked, tabbed, toggle split)
  148. bindsym $mod+t layout tabbed
  149. bindsym $mod+e layout toggle split
  150. # enter fullscreen mode for the focused container
  151. bindsym $mod+f fullscreen toggle
  152. # toggle tiling /floating
  153. bindsym $mod+Shift+space floating toggle
  154. # change focus between tiling / floating windows
  155. bindsym $mod+space focus mode_toggle
  156. # focus the parent container
  157. # bindsym $mod+a focus parent
  158. # focus the child container
  159. #bindsym $mod+d focus child
  160. # gaps [[[ #
  161. set $inner_gaps 20
  162. # set $inner_gaps 7
  163. # set $inner_gaps 0
  164. set $outer_gaps 0
  165. # set $border_radius 15
  166. set $border_radius 0
  167. # remove window titlebars
  168. # for_window [class="^.*"] border pixel 2
  169. for_window [class="^.*"] border pixel 3
  170. # gaps inner $inner_gaps
  171. # gaps outer $outer_gaps
  172. # gaps bottom 0
  173. gaps inner 0
  174. gaps outer 0
  175. {{ if eq .chezmoi.hostname "nzxt" }}
  176. # border_radius $border_radius
  177. {{ end }}
  178. # other gaps [[[ #
  179. # gaps horizontal 20
  180. # gaps vertical 10
  181. # gaps top
  182. # gaps left 20
  183. # gaps right 20
  184. # gaps bottom
  185. # ]]] other gaps #
  186. bindsym Control+shift+plus gaps inner all set $inner_gaps;gaps outer all set $outer_gaps
  187. bindsym Control+shift+0 gaps inner all set 0;gaps outer all set 0
  188. # ]]] gaps #
  189. # colors from pywal [[[ #
  190. set_from_resource $fg i3wm.color7 #f0f0f0
  191. #F0F0F0
  192. # Set colors from Xresources
  193. # Change 'color7' and 'color2' to whatever colors you want i3 to use
  194. # from the generated scheme.
  195. # NOTE: The '#f0f0f0' in the lines below is the color i3 will use if
  196. # it fails to get colors from Xresources.
  197. set_from_resource $bg i3wm.color2 #f0f0f0
  198. # class border backgr. text indicator child_border
  199. client.focused $bg $bg $fg $bg $bg
  200. # client.unfocused $fg $bg $fg $bg $fg
  201. # client.urgent $bg $bg $fg $bg $bg
  202. # client.placeholder $bg $bg $fg $bg $bg
  203. # client.background $bg
  204. # ]]] colors from pywal #
  205. # ]]] container display #
  206. # moving windows [[[ #
  207. # Use Mouse+$mod to drag floating windows to their wanted position
  208. floating_modifier $mod
  209. # change focus
  210. bindsym Control+h focus left
  211. bindsym Control+j focus down
  212. bindsym Control+k focus up
  213. bindsym Control+l focus right
  214. # move workspace to other monitor
  215. bindsym $mod+minus move workspace to output left
  216. bindsym $mod+plus move workspace to output right
  217. # move focused window
  218. {{ if eq .chezmoi.hostname "x1-carbon" }}
  219. bindsym Control+Shift+h move left 50px
  220. bindsym Control+Shift+j move down 50px
  221. bindsym Control+Shift+k move up 50px
  222. bindsym Control+Shift+l move right 50px
  223. {{ else }}
  224. bindsym Control+Shift+h move left
  225. bindsym Control+Shift+j move down
  226. bindsym Control+Shift+k move up
  227. bindsym Control+Shift+l move right
  228. {{ end }}
  229. # split in horizontal orientation
  230. bindsym $mod+b split h
  231. bindsym Control+$mod+b split h; exec $term
  232. # split in vertical orientation
  233. bindsym $mod+v split v
  234. bindsym Mod4+$mod+v split v; exec $term
  235. # resizing windows #
  236. bindsym Control+$mod+h resize grow width 5 px or 5 ppt
  237. bindsym Control+$mod+k resize grow height 5 px or 5 ppt
  238. bindsym Control+$mod+j resize shrink height 5 px or 5 ppt
  239. bindsym Control+$mod+l resize shrink width 5 px or 5 ppt
  240. # bindsym Control+Shift+x kill
  241. bindsym shift+x kill
  242. bindsym Control+$mod+t sticky toggle
  243. # bindsym Control+$mod+a floating enable; resize set 400px 125px; move absolute position 1648 200; sticky enable
  244. bindsym Control+$mod+a floating enable; resize set 400px 150px; move absolute position 424 945; sticky enable
  245. # for_window [class="ada-mario"] floating enable
  246. # for_window [class="ada-mario"] move absolute position 640 0
  247. # ]]] moving windows #
  248. # backgrounds [[[ #
  249. set $make_st_script "/home/kevin/st/make-st.sh"
  250. # test
  251. {{ if eq .chezmoi.hostname "x1-carbon" }}
  252. bindsym Control+Shift+q exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/editing") && $make_st_script
  253. bindsym Control+Shift+w exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") && $make_st_script
  254. bindsym Control+$mod+z exec feh --bg-fill ~/Pictures/Backgrounds/dim/black.jpg
  255. {{ else }}
  256. bindsym Control+$mod+q exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/editing") && $make_st_script
  257. bindsym Control+$mod+w exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") && $make_st_script
  258. {{ end }}
  259. bindsym $mod+r exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/editing") && $make_st_script
  260. bindsym Control+$mod+y exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/non-editing") && $make_st_script
  261. # ]]] backgrounds #
  262. # ws names [[[ #
  263. set $ws1 "1  "
  264. {{ if eq .chezmoi.hostname "x1-carbon" }}
  265. set $secondary "HDMI2"
  266. set $main "eDP1"
  267. {{ else if eq .chezmoi.hostname "nzxt" }}
  268. set $secondary "DVI-I-1"
  269. set $main "HDMI-0"
  270. {{ end }}
  271. # workspace $ws1 output $main
  272. workspace $ws1 output $secondary
  273. bindsym $mod+F1 workspace $ws1; exec $term
  274. bindsym Mod4+$mod+F1 workspace $ws1; exec chatterino
  275. bindsym Control+Shift+F1 workspace $ws1; exec $term -e fish -c 'tmux-attach school'
  276. # bindsym Control+Shift+F1 workspace $ws1; exec $term -e fish -c 'tmux-attach nft'
  277. set $ws2 "2 "
  278. set $work_laptop_ip "192.168.0.11"
  279. workspace $ws2 output $secondary
  280. bindsym $mod+F2 workspace $ws2; exec $term
  281. # bindsym Control+Shift+F2 workspace $ws2; exec $term -e mosh kmok@$work_laptop_ip -- tmux a -t nzxt
  282. # bindsym Control+Shift+F2 workspace $ws2; exec $term -e fish -c 'tmux-attach fortnite'
  283. # bindsym Control+Shift+F2 workspace $ws2; exec $term -e fish -c 'tmux-attach nft-2'
  284. bindsym Control+Shift+F2 workspace $ws2; exec $term -e fish -c 'tmux-attach school-2'
  285. bindsym $mod+Shift+F2 workspace $ws2; exec $term -e mosh kmok@$work_laptop_ip -- tmux a -t nzxt-2
  286. # ws3 [[[ #
  287. set $ws3 "3 "
  288. # set $ws3 "3 "
  289. # workspace $ws3 output $main
  290. # bindsym $mod+F3 workspace $ws3; exec $browser
  291. # bindsym $mod+F3 exec $browser; move container to workspace $ws3; workspace $ws3
  292. bindsym $mod+F3 exec $browser
  293. bindsym Control+Shift+F3 workspace $ws3; exec firefox -P work
  294. # bindsym Mod4+$mod+F3 workspace $ws3; exec $browser_secondary
  295. bindsym Mod4+$mod+F3 workspace $ws3; exec firefox -P default
  296. # bindsym Mod4+$mod+F3 workspace $ws3; exec firefox -P work
  297. # bindsym Mod4+b workspace $ws3; layout stacked; exec $term -e fish -c "buku-fzf"
  298. # bindsym Mod4+$mod+b workspace $ws3; layout stacked; exec $term -e fish -c "buku-fzf fq"
  299. # bindsym Mod4+b layout stacked; exec $term -e fish -c "buku-fzf"
  300. # bindsym Mod4+$mod+b layout stacked; exec $term -e fish -c "buku-fzf fq"
  301. bindsym Mod4+b layout tabbed; exec $term -e fish -c "buku-fzf"
  302. bindsym Mod4+$mod+b layout tabbed; exec $term -e fish -c "buku-fzf fq"
  303. # bindsym Mod4+g workspace $ws3; layout tabbed; exec gimp
  304. # ]]] ws3 #
  305. set $ws4 "4 "
  306. workspace $ws4 output $secondary
  307. # bindsym $mod+F4 workspace $ws4; exec $term
  308. # bindsym Control+Shift+F4 workspace $ws4; exec $term -e fish -c 'tmux-attach misc'
  309. bindsym $mod+F4 workspace $ws4; exec $term -e fish -c 'tmux-attach misc'
  310. bindsym Mod4+$mod+F4 workspace $ws4; exec urxvt -e ranger $screenshot_folder
  311. bindsym Mod4+e workspace $ws4; exec libreoffice ~/Documents/expenses/investments.ods
  312. bindsym Mod4+g workspace $ws4; layout tabbed; exec gimp
  313. # ws5 [[[ #
  314. set $ws5 "5 "
  315. # workspace $ws5 output $secondary
  316. assign [class="Steam"] $ws5
  317. bindsym $mod+F5 workspace $ws5; exec $browser
  318. # bindsym $mod+Mod4+F5 workspace $ws5; exec firefox -P work
  319. bindsym $mod+Mod4+F5 workspace $ws5; exec firefox -P nft
  320. # bindsym $mod+Mod4+F5 workspace $ws5; exec firefox --private-window
  321. bindsym Control+Shift+F5 workspace $ws5; exec firefox -P work
  322. bindsym Mod4+f workspace $ws5; exec firefox --private-window google.ca
  323. bindsym $mod+Shift+F5 workspace $ws5; exec chromium
  324. # bindsym Mod4+g workspace $ws5; layout stacking; exec $term -e steam
  325. # bindsym Mod4+g workspace $ws5; layout tabbed; exec gimp
  326. # bindsym Mod4+g workspace $ws5; exec mgba-qt
  327. # bindsym Mod4+i workspace $ws5; exec idea
  328. # bindsym Mod4+m workspace $ws5; layout tabbed; exec $term -e ~/.minetest/minetest/bin/minetest
  329. # bindsym Mod4+$mod+t workspace $ws5; exec thunderbird
  330. # bindsym Mod4+$mod+w workspace $ws5; exec $term -e twitchy
  331. # bindsym Mod4+w workspace $ws5; exec $term -e twitchy
  332. bindsym Mod4+5 workspace $ws5; exec godot
  333. bindsym Mod4+F5 workspace $ws5; exec cd ~/coding/ada-mario && godot -e
  334. # for_window [class="Move_mouse_with_head"] floating enable; move absolute position 0 0
  335. for_window [class="Face_detector"] floating enable
  336. for_window [class="Face_detector"] move absolute position 0 0
  337. for_window [class="ada-mario"] floating enable
  338. # for_window [class="ada-mario"] move absolute position 930 480
  339. for_window [class="ada-mario"] move absolute position 640 0
  340. # ]]] ws5 #
  341. # ws6 [[[ #
  342. set $ws6 "6 "
  343. workspace $ws6 output $secondary
  344. assign [class="Slack"] $ws6
  345. bindsym Mod4+d workspace $ws6; exec discord
  346. bindsym Mod4+$mod+d workspace $ws6; exec element-desktop
  347. # bindsym Mod4+d workspace $ws6; exec firefox -new-window https://riot.im/app
  348. bindsym Mod4+k workspace $ws6; exec slack
  349. # bindsym Mod4+i workspace $ws6; exec $term -e fish -c 'mosh kmok@$work_laptop_ip -- tmux a -t weechat'
  350. bindsym Mod4+i workspace $ws6; exec $term -e fish -c 'mosh kmok@$work_laptop_ip -- tmux a -t weechat'
  351. # bindsym Mod4+i workspace $ws6; exec $term -e fish -c 'tmux-attach weechat'
  352. # ]]] ws6 #
  353. set $ws7 "7 "
  354. workspace $ws7 output $secondary
  355. # bindsym $mod+F7 workspace $ws7; exec $term
  356. # bindsym $mod+F7 workspace $ws7; exec $term -e mosh kmok@$work_laptop_ip -- tmux a -t nzxt
  357. bindsym $mod+F7 workspace $ws7; exec $term
  358. bindsym Mod4+$mod+F7 workspace $ws7; exec $term -e mosh --ssh='ssh -p 399' kevin@165.22.239.234 tmux a
  359. bindsym $mod+Shift+F7 workspace $ws7; exec chromium https://txstreet.com/v/eth
  360. bindsym Mod4+a workspace $ws7; exec android-file-transfer
  361. # bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1"
  362. set $ws8 "8 "
  363. # assign [class="jetbrains-"] $ws8
  364. workspace $ws8 output $secondary
  365. # bindsym $mod+F8 workspace $ws8; exec $term
  366. # bindsym $mod+F8 workspace $ws8; exec $term -e tmux a -t journal
  367. bindsym $mod+F8 workspace $ws8; exec $term -e fish -c 'tmux-attach journal'
  368. bindsym Mod4+$mod+F8 workspace $ws8; exec libreoffice ~/Documents/sit-stand/sit-stand.ods
  369. bindsym $mod+Shift+F8 workspace $ws8; exec libreoffice ~/Documents/red-hat/workday.ods
  370. set $ws9 "9 "
  371. workspace $ws9 output $secondary
  372. # bindsym $mod+F9 workspace $ws9; exec $term
  373. # bindsym $mod+F9 workspace $ws9; exec $term -e tmux a -t config
  374. bindsym $mod+F9 workspace $ws9; exec $term -e fish -c 'tmux-attach config'
  375. set $ws10 "10 "
  376. # set $ws10 "10 🎵"
  377. assign [class="spotify"] $ws10
  378. workspace $ws10 output $secondary
  379. set $hp 2
  380. # bindsym Mod4+v workspace $ws10; exec $term -e alsamixer -c 0
  381. bindsym Mod4+v workspace $ws10; exec $term -e alsamixer -c 1
  382. # bindsym Mod4+$mod+c workspace $ws10; exec $term -e cava
  383. # bindsym Mod4+h workspace $ws10; exec $term -e alsamixer -c $hp
  384. bindsym Mod4+s workspace $ws10; exec ~/scripts/spotify-clean
  385. set $ws11 "11 "
  386. # set $ws11 "11 📊"
  387. # assign [class="Summoners War Exporter"] $ws11
  388. workspace $ws11 output $secondary
  389. # bindsym $mod+F11 workspace $ws11; exec $term -e htop -s PERCENT_CPU
  390. bindsym $mod+F11 workspace $ws11; exec $term -e htop -s PERCENT_MEM
  391. # bindsym Mod4+$mod+F11 workspace $ws11; exec $term -e fish -c 'tmux-attach backup'
  392. bindsym Control+Shift+F11 workspace $ws11; exec $term -e fish -c 'tmux-attach backup'
  393. bindsym Mod4+t workspace $ws11; exec nordvpn connect && transmission-gtk
  394. # bindsym $mod+F11 workspace $ws11; exec $term -e gotop -m
  395. # bindsym Mod4+a workspace $ws11; exec antimicro
  396. set $ws12 "12 "
  397. bindsym $mod+F12 workspace $ws12; exec $term
  398. set $ws13 "13 "
  399. bindsym Mod4+F3 workspace $ws13; exec $term
  400. set $ws14 "14"
  401. set $ws15 "15"
  402. # ]]] ws names #
  403. # ws bindings [[[ #
  404. # bindsym $mod+h workspace prev
  405. # bindsym $mod+l workspace next
  406. bindsym $mod+1 workspace $ws1
  407. bindsym $mod+2 workspace $ws2
  408. bindsym $mod+3 workspace $ws3
  409. bindsym $mod+4 workspace $ws4
  410. bindsym $mod+5 workspace $ws5
  411. bindsym $mod+6 workspace $ws6
  412. bindsym $mod+7 workspace $ws7
  413. bindsym $mod+8 workspace $ws8
  414. bindsym $mod+9 workspace $ws9
  415. bindsym $mod+0 workspace $ws10
  416. bindsym Mod4+1 workspace $ws11
  417. # bindsym Mod4+2 workspace $ws12
  418. # bindsym Mod4+3 workspace $ws13
  419. # bindsym Mod4+4 workspace $ws14
  420. # bindsym Mod4+5 workspace $ws15
  421. # move container to ws [[[ #
  422. bindsym $mod+Control+1 move container to workspace $ws1; workspace $ws1
  423. bindsym $mod+Control+2 move container to workspace $ws2; workspace $ws2
  424. bindsym $mod+Control+3 move container to workspace $ws3; workspace $ws3
  425. bindsym $mod+Control+4 move container to workspace $ws4; workspace $ws4
  426. bindsym $mod+Control+5 move container to workspace $ws5; workspace $ws5
  427. bindsym $mod+Control+6 move container to workspace $ws6; workspace $ws6
  428. bindsym $mod+Control+7 move container to workspace $ws7; workspace $ws7
  429. bindsym $mod+Control+8 move container to workspace $ws8; workspace $ws8
  430. bindsym $mod+Control+9 move container to workspace $ws9; workspace $ws9
  431. bindsym $mod+Control+0 move container to workspace $ws10; workspace $ws10
  432. bindsym $mod+Shift+1 move container to workspace $ws11; workspace $ws11
  433. bindsym $mod+Shift+2 move container to workspace $ws12; workspace $ws12
  434. bindsym $mod+Shift+3 move container to workspace $ws13; workspace $ws13
  435. bindsym $mod+Shift+4 move container to workspace $ws14; workspace $ws14
  436. bindsym $mod+Shift+5 move container to workspace $ws15; workspace $ws15
  437. # ]]] move container to ws #
  438. # ]]] ws bindings #
  439. # reload config [[[ #
  440. bindsym Control+$mod+r exec i3-msg restart
  441. bindsym $mod+Shift+c reload
  442. # bindsym $mod+Control+r reload
  443. bindsym $mod+Control+u exec xrdb ~/.Xresources && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null
  444. # exit i3 (logs you out of your X session)
  445. bindsym Control+$mod+s exec systemctl suspend
  446. 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'"
  447. # ]]] reload config #
  448. # status bar [[[ #
  449. # bar vars [[[ #
  450. # set $sb_font Hack NF Bold
  451. set $sb_font Hack Nerd Font Mono Bold
  452. # set $sb_font EmojiOne
  453. # set $sb_font DejaVuSansMono Nerd Font Mono Bold
  454. set $black #000000
  455. set $white #ffffff
  456. for_window [class="Yad"] floating enable
  457. # set $inactive_ws_bg $white
  458. set $inactive_ws_bg #444c52
  459. #00ffff
  460. # set $inactive_ws_trans 96
  461. set $inactive_ws_trans 00
  462. # set $active_ws_trans 91
  463. set $active_ws_trans 4b
  464. set $focused_ws_text #ffffff
  465. # ]]] bar vars #
  466. # main bar [[[ #
  467. # set $bar_trans 64
  468. set $bar_trans 00
  469. set $main_ws_trans aa
  470. bar {
  471. i3bar_command i3bar -t
  472. {{ if eq .chezmoi.hostname "x1-carbon" }}
  473. font pango:$sb_font 17
  474. {{ else }}
  475. # font pango:$sb_font 17
  476. font pango:$sb_font 16
  477. {{ end }}
  478. colors {
  479. # 0 (transparent) -> 255 (opaque) in hex
  480. background $black$bar_trans
  481. # border, bg, text color
  482. # focused_workspace $inactive_ws_bg $bg $focused_ws_text
  483. focused_workspace $inactive_ws_bg $bg $fg
  484. # active = focused on other screen
  485. active_workspace $inactive_ws_bg $fg$active_ws_trans $fg
  486. inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg
  487. }
  488. tray_output none
  489. # status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
  490. status_command 2>/tmp/i3blocks.err i3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf | tee /tmp/i3blocks.out
  491. output $main
  492. wheel_up_cmd nop
  493. wheel_down_cmd nop
  494. }
  495. # ]]] main bar #
  496. # secondary bar [[[ #
  497. bar {
  498. output $secondary
  499. {{ if eq .chezmoi.hostname "x1-carbon" }}
  500. font pango:$sb_font 18
  501. {{ else }}
  502. font pango:$sb_font 21
  503. # font pango:$sb_font 20
  504. # font pango:$sb_font 17
  505. {{ end }}
  506. # output $main
  507. i3bar_command i3bar -t
  508. colors {
  509. background $black$bar_trans
  510. # border, bg, text color
  511. # focused_workspace $inactive_ws_bg $bg $focused_ws_text
  512. focused_workspace $inactive_ws_bg $bg $fg
  513. active_workspace $inactive_ws_bg $fg$active_ws_trans $fg
  514. inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg
  515. }
  516. status_command i3blocks -c ~/.config/i3blocks/i3blocks-secondary.conf
  517. # status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/i3blocks/sam-i3blocks.conf | tee /tmp/i3blocks-sam.out
  518. tray_output none
  519. wheel_up_cmd nop
  520. wheel_down_cmd nop
  521. }
  522. # ]]] secondary bar #
  523. # display bar [[[ #
  524. # bar {
  525. # i3bar_command i3bar -t
  526. # font pango:$sb_font 23
  527. # tray_output none
  528. # status_command i3blocks -c ~/.config/i3blocks/i3blocks-display.conf
  529. # output $secondary
  530. # wheel_up_cmd nop
  531. # wheel_down_cmd nop
  532. # }
  533. # ]]] display bar #
  534. # ]]] status bar #
  535. # media keys [[[ #
  536. # sink
  537. bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
  538. bindsym Control+d exec ~/linux-config/scripts/change-sink dac
  539. # bindsym Control+shift+d exec ~/linux-config/scripts/change-sink dac2
  540. bindsym Control+o exec ~/linux-config/scripts/change-sink line-out
  541. # media
  542. # fn key [[[ #
  543. bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
  544. bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks
  545. bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
  546. # bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
  547. bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
  548. bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
  549. # ]]] fn key #
  550. # ]]] media keys #
  551. # vim: fdm=marker ft=i3.go-template