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.

570 lines
19 KiB

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