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.

597 lines
21 KiB

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