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.

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