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.

617 lines
22 KiB

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