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.

650 lines
24 KiB

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