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.

583 lines
20 KiB

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