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.

516 lines
17 KiB

6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
6 years ago
6 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # startup {{{ #
  2. # vim: fdm=marker
  3. set $browser "firefox"
  4. # set $browser "chromium"
  5. set $def_term "urxvt"
  6. set $scripts_path "/home/kevin/linux-config/scripts"
  7. exec redshift -O 2000
  8. # exec redshift -O 3000
  9. # random bg
  10. exec compton
  11. exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing")
  12. exec imwheel
  13. exec xmodmap ~/.Xmodmap
  14. exec xset r rate $XSET_DELAY $XSET_RATE
  15. exec xrdb ~/.Xresources
  16. exec --no-startup-id dunst
  17. exec --no-startup-id start-pulseaudio-x11
  18. exec --no-startup-id i3-msg 'workspace $ws2; exec $def_term'
  19. exec --no-startup-id i3-msg 'workspace $ws3; exec $browser'
  20. # exec --no-startup-id i3-msg 'workspace $ws11; exec $swex'
  21. exec_always --no-startup-id numlockx on
  22. # }}} startup #
  23. # applications {{{ #
  24. set $mod Mod1
  25. set $sch_dir "$HOME/Documents/School"
  26. # app shortcuts {{{ #
  27. bindsym Mod4+a exec studio
  28. # bindsym Mod4+1 exec xdotool click --repeat 5 --delay 100 1
  29. # bindsym Mod4+2 exec xdotool click --repeat 10 --delay 100 1
  30. # bindsym Mod4+3 exec xdotool click --repeat 20 --delay 100 1
  31. # bindsym $mod+control+Return exec i3-sensible-terminal
  32. # bindsym $mod+control+Return exec $def_term
  33. bindsym control+Return exec $def_term
  34. bindsym Mod4+c exec $browser
  35. bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)"
  36. bindsym Mod4+f exec firefox
  37. bindsym Mod4+$mod+f exec echo 'Kevin@fosstodon.org' | xclip -selection clipboard
  38. bindsym Mod4+h exec echo 'kevin.mok@live.ca' | xclip -selection clipboard
  39. bindsym Mod4+$mod+m exec pass -c uoft/markus
  40. bindsym Mod4+n exec urxvt -e nvim
  41. bindsym Mod4+o exec xclip -selection clipboard ~/.password-store/social/gmail
  42. bindsym Mod4+$mod+o exec xset dpms force off
  43. # bindsym Mod4+p workspace $ws4; exec pgadmin3
  44. # bindsym Mod4+p exec pycharm
  45. bindsym Mod4+p exec passmenu
  46. # bindsym Mod4+$mod+p exec notify-send "ping" "$(ping -c 3 -W 1 8.8.8.8)"
  47. bindsym Mod4+q exec qdirstat
  48. bindsym Mod4+r exec urxvt -e ranger
  49. bindsym Mod4+$mod+r exec notify-send "watson restart" "$(watson restart)"
  50. bindsym control+$mod+s exec systemctl suspend
  51. # bindsym Mod4+t exec st
  52. bindsym Mod4+$mod+t exec xclip -selection clipboard ~/.password-store/social/trapbot
  53. bindsym Mod4+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard
  54. bindsym Mod4+$mod+u exec pass -c uoft/acorn
  55. bindsym Mod4+w exec notify-send "watson status" "$(watson status)"
  56. bindsym Mod4+$mod+w exec notify-send "watson stop" "$(watson status && watson stop)"
  57. bindsym control+$mod+w exec urxvt -e nvim /home/kevin/.config/watson/state.tmp
  58. # bindsym Mod4+x exec $swex
  59. bindsym Mod4+x exec xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE
  60. bindsym Mod4+z exec cliqz
  61. # bindsym Print exec gscreenshot
  62. bindsym Print --release exec "scrot -s /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
  63. bindsym control+Print --release exec "scrot -u /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
  64. # }}} app shortcuts #
  65. # redshift {{{ #
  66. bindsym $mod+Mod4+1 exec redshift -x && redshift -O 1250
  67. bindsym $mod+Mod4+2 exec redshift -x && redshift -O 2000
  68. bindsym $mod+Mod4+3 exec redshift -x && redshift -O 3000
  69. bindsym $mod+Mod4+4 exec redshift -x && redshift -O 4000
  70. bindsym $mod+Mod4+5 exec redshift -x && redshift -O 5000
  71. bindsym $mod+Mod4+grave exec redshift -x
  72. # old
  73. # bindsym $mod+Mod4+1 exec redshift -x && redshift -O 1000
  74. # bindsym $mod+Mod4+3 exec redshift -x && redshift -O 1500
  75. # bindsym $mod+Mod4+3 exec redshift -x && redshift -O 2500
  76. # }}} redshift #
  77. # backlight {{{ #
  78. bindsym Shift+F1 exec xbacklight -set 10
  79. bindsym Shift+F2 exec xbacklight -set 20
  80. bindsym Shift+F3 exec xbacklight -set 30
  81. bindsym Shift+F4 exec xbacklight -set 40
  82. bindsym Shift+F5 exec xbacklight -set 50
  83. bindsym Shift+F6 exec xbacklight -set 60
  84. bindsym Shift+F7 exec xbacklight -set 70
  85. bindsym Shift+F8 exec xbacklight -set 80
  86. bindsym Shift+F9 exec xbacklight -set 90
  87. bindsym Shift+F0 exec xbacklight -set 100
  88. # }}} backlight #
  89. # menu {{{ #
  90. # start dmenu (a program launcher)
  91. # bindsym Mod4+Return exec dmenu_run
  92. # There also is the (new) i3-dmenu-desktop which only displays applications
  93. # shipping a .desktop file. It is a wrapper around dmenu, so you need that
  94. # installed.
  95. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
  96. # }}} menu #
  97. # Use Mouse+$mod to drag floating windows to their wanted position
  98. floating_modifier $mod
  99. for_window [class="Peek"] floating enable
  100. # }}} applications #
  101. # changing/focusing/moving windows {{{ #
  102. # change focus
  103. bindsym control+h focus left
  104. bindsym control+j focus down
  105. bindsym control+k focus up
  106. bindsym control+l focus right
  107. # move workspace to other monitor
  108. bindsym $mod+minus move workspace to output left
  109. bindsym $mod+plus move workspace to output right
  110. # alternatively, you can use the cursor keys:
  111. bindsym $mod+Left focus left
  112. bindsym $mod+Down focus down
  113. bindsym $mod+Up focus up
  114. bindsym $mod+Right focus right
  115. # move focused window
  116. bindsym control+Shift+h move left
  117. bindsym control+Shift+j move down
  118. bindsym control+Shift+k move up
  119. bindsym control+Shift+l move right
  120. # alternatively, you can use the cursor keys:
  121. bindsym $mod+Shift+Left move left
  122. bindsym $mod+Shift+Down move down
  123. bindsym $mod+Shift+Up move up
  124. bindsym $mod+Shift+Right move right
  125. # split in horizontal orientation
  126. bindsym $mod+b split h
  127. bindsym Mod4+$mod+b split h; exec $def_term
  128. # split in vertical orientation
  129. bindsym $mod+v split v
  130. bindsym Mod4+$mod+v split v; exec $def_term
  131. # bindsym control+Shift+x kill
  132. bindsym shift+x kill
  133. # }}} changing/focusing/moving windows #
  134. # container display {{{ #
  135. # backgrounds
  136. # set $colors_sh "~/.cache/wal/colors.sh"
  137. bindsym $mod+q exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/editing")
  138. bindsym $mod+w exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing")
  139. # bindsym $mod+w exec ~/linux-config/scripts/bg-chooser
  140. bindsym $mod+r exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/editing")
  141. bindsym $mod+y exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/non-editing")
  142. # enter fullscreen mode for the focused container
  143. bindsym $mod+f fullscreen toggle
  144. # change container layout (stacked, tabbed, toggle split)
  145. bindsym $mod+s layout stacking
  146. bindsym $mod+t layout tabbed
  147. bindsym $mod+e layout toggle split
  148. # toggle tiling /floating
  149. bindsym $mod+Shift+space floating toggle
  150. # change focus between tiling / floating windows
  151. bindsym $mod+space focus mode_toggle
  152. # focus the parent container
  153. bindsym $mod+a focus parent
  154. # focus the child container
  155. #bindsym $mod+d focus child
  156. # change container colors from pywal {{{ #
  157. # Set colors from Xresources
  158. # Change 'color7' and 'color2' to whatever colors you want i3 to use
  159. # from the generated scheme.
  160. # NOTE: The '#f0f0f0' in the lines below is the color i3 will use if
  161. # it fails to get colors from Xresources.
  162. set_from_resource $fg i3wm.color7 #f0f0f0
  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. # PROTIP: You can also dynamically set dmenu's colors this way:
  171. bindsym Mod4+Return exec dmenu_run -nb "$fg" -nf "$bg" -sb "$bg" -sf "$fg"
  172. # }}} change container colors from pywal #
  173. # }}} container display #
  174. # workspace {{{ #
  175. # ws names {{{ #
  176. set $samsung "DVI-I-1"
  177. set $benq "HDMI-0"
  178. set $ws1 "1 "
  179. workspace $ws1 output $benq
  180. bindsym $mod+F1 workspace $ws1; exec $def_term
  181. set $ws2 "2 "
  182. workspace $ws2 output $samsung
  183. bindsym $mod+F2 workspace $ws2; exec $def_term
  184. set $ws3 "3 "
  185. # set $ws3 "3 "
  186. workspace $ws3 output $benq
  187. bindsym $mod+F3 workspace $ws3; exec $browser
  188. set $ws4 "4 "
  189. workspace $ws4 output $samsung
  190. bindsym $mod+F4 workspace $ws4; exec $def_term
  191. set $ws5 "5 "
  192. # set $ws5 "5 🎥"
  193. workspace $ws5 output $samsung
  194. assign [class="Steam"] $ws5
  195. bindsym $mod+F5 workspace $ws5; exec $browser
  196. # bindsym Mod4+g workspace $ws5; layout stacking; exec urxvt -e steam
  197. bindsym Mod4+t workspace $ws5; exec thunderbird
  198. set $ws6 "6 "
  199. workspace $ws6 output $samsung
  200. assign [class="Slack"] $ws6
  201. bindsym Mod4+d workspace $ws6; exec discord
  202. bindsym Mod4+i workspace $ws6; exec firefox -new-window https://riot.im/app/#/home
  203. # bindsym Mod4+k workspace $ws6; exec slack
  204. set $ws7 "7 "
  205. # set $ws7 "7 📤"
  206. workspace $ws7 output $samsung
  207. bindsym $mod+F7 workspace $ws7; exec $def_term
  208. # bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1"
  209. set $ws8 "8 "
  210. # set $ws8 "8 📊"
  211. # assign [class="jetbrains-"] $ws8
  212. workspace $ws8 output $samsung
  213. bindsym $mod+F8 workspace $ws8; exec $def_term
  214. set $ws9 "9 "
  215. # set $ws9 "9 🔧"
  216. workspace $ws9 output $samsung
  217. bindsym $mod+F9 workspace $ws9; exec $def_term
  218. set $ws10 "10 "
  219. # set $ws10 "10 🎵"
  220. assign [class="spotify"] $ws10
  221. workspace $ws10 output $samsung
  222. set $hp 2
  223. # bindsym Mod4+v workspace $ws10; exec urxvt -e alsamixer -c 0
  224. bindsym Mod4+v workspace $ws10; exec urxvt -e cava
  225. # bindsym Mod4+h workspace $ws10; exec urxvt -e alsamixer -c $hp
  226. bindsym Mod4+s workspace $ws10; exec spotify
  227. set $ws11 "11 "
  228. # set $ws11 "11 📊"
  229. # assign [class="Summoners War Exporter"] $ws11
  230. workspace $ws11 output $samsung
  231. bindsym $mod+F11 workspace $ws11; exec urxvt -e htop -s PERCENT_CPU
  232. set $ws12 "12 "
  233. bindsym $mod+F12 workspace $ws12; exec $def_term
  234. set $ws13 "13 "
  235. bindsym Mod4+F3 workspace $ws13; exec $def_term
  236. set $ws14 "14"
  237. set $ws15 "15"
  238. # }}} ws names #
  239. # ws bindings {{{ #
  240. # switch to workspace
  241. bindsym $mod+h workspace prev
  242. bindsym $mod+l workspace next
  243. bindsym $mod+1 workspace $ws1
  244. bindsym $mod+2 workspace $ws2
  245. bindsym $mod+3 workspace $ws3
  246. bindsym $mod+4 workspace $ws4
  247. bindsym $mod+5 workspace $ws5
  248. bindsym $mod+6 workspace $ws6
  249. bindsym $mod+7 workspace $ws7
  250. bindsym $mod+8 workspace $ws8
  251. bindsym $mod+9 workspace $ws9
  252. bindsym $mod+0 workspace $ws10
  253. bindsym Mod4+1 workspace $ws11
  254. bindsym Mod4+2 workspace $ws12
  255. bindsym Mod4+3 workspace $ws13
  256. bindsym Mod4+4 workspace $ws14
  257. bindsym Mod4+5 workspace $ws15
  258. # }}} ws bindings #
  259. # move container to ws {{{ #
  260. # move focused container to workspace
  261. # bindsym $mod+control+1 move container to workspace $ws1
  262. bindsym $mod+control+1 move container to workspace $ws1; workspace $ws1
  263. bindsym $mod+control+2 move container to workspace $ws2; workspace $ws2
  264. bindsym $mod+control+3 move container to workspace $ws3; workspace $ws3
  265. bindsym $mod+control+4 move container to workspace $ws4; workspace $ws4
  266. bindsym $mod+control+5 move container to workspace $ws5; workspace $ws5
  267. bindsym $mod+control+6 move container to workspace $ws6; workspace $ws6
  268. bindsym $mod+control+7 move container to workspace $ws7; workspace $ws7
  269. bindsym $mod+control+8 move container to workspace $ws8; workspace $ws8
  270. bindsym $mod+control+9 move container to workspace $ws9; workspace $ws9
  271. bindsym $mod+control+0 move container to workspace $ws10; workspace $ws10
  272. bindsym $mod+Shift+1 move container to workspace $ws11; workspace $ws11
  273. bindsym $mod+Shift+2 move container to workspace $ws12; workspace $ws12
  274. bindsym $mod+Shift+3 move container to workspace $ws13; workspace $ws13
  275. bindsym $mod+Shift+4 move container to workspace $ws14; workspace $ws14
  276. bindsym $mod+Shift+5 move container to workspace $ws15; workspace $ws15
  277. # }}} move container to ws #
  278. # }}} workspace #
  279. # reload config/computer {{{ #
  280. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  281. # bindsym $mod+control+r exec ~/.cache/wal/colors.sh; restart
  282. bindsym $mod+control+r exec i3-msg restart
  283. # bindsym $mod+control+r exec $colors_sh && i3-msg restart
  284. # reload the configuration file
  285. bindsym $mod+Shift+c reload
  286. # bindsym $mod+control+r reload
  287. bindsym $mod+control+u exec xrdb ~/.Xresources
  288. # exit i3 (logs you out of your X session)
  289. 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'"
  290. # }}} reload config #
  291. # resizing windows {{{ #
  292. bindsym $mod+control+h resize grow width 5 px or 5 ppt
  293. bindsym $mod+control+k resize grow height 5 px or 5 ppt
  294. bindsym $mod+control+j resize shrink height 5 px or 5 ppt
  295. bindsym $mod+control+l resize shrink width 5 px or 5 ppt
  296. # }}} resizing windows #
  297. # gaps {{{ #
  298. # remove window titlebars
  299. for_window [class="^.*"] border pixel 3
  300. # for_window [class="^.*"] border pixel 1
  301. set $inner_gaps 40
  302. set $outer_gaps 0
  303. # gaps inner $inner_gaps
  304. # gaps outer $outer_gaps
  305. # gaps bottom 0
  306. gaps inner 0
  307. gaps outer 0
  308. # other gaps {{{ #
  309. # gaps horizontal 20
  310. # gaps vertical 10
  311. # gaps top
  312. # gaps left 20
  313. # gaps right 20
  314. # gaps bottom
  315. # }}} other gaps #
  316. bindsym control+shift+plus gaps inner all set $inner_gaps;gaps outer all set $outer_gaps
  317. bindsym control+shift+0 gaps inner all set 0;gaps outer all set 0
  318. # }}} gaps #
  319. # status bar {{{ #
  320. # Start i3bar to display a workspace bar (plus the system information i3status
  321. # finds out, if available)
  322. set $sb_font DejaVuSansMono Nerd Font Mono Bold
  323. # set $sb_font Hack NF Bold
  324. # set $sb_font EmojiOne
  325. set $black #000000
  326. set $white #ffffff
  327. for_window [class="Yad"] floating enable
  328. # inactive vars {{{ #
  329. # set $inactive_ws_bg $white
  330. set $inactive_ws_bg #444c52
  331. # set $inactive_ws_trans 96
  332. set $inactive_ws_trans 00
  333. # }}} inactive #
  334. # set $active_ws_trans 91
  335. set $active_ws_trans 4b
  336. set $focused_ws_text #ffffff
  337. # benq bar {{{ #
  338. # set $bar_trans 64
  339. set $bar_trans 00
  340. set $benq_ws_trans aa
  341. bar {
  342. i3bar_command i3bar -t
  343. font pango:$sb_font 21
  344. # font pango:$sb_font 14
  345. colors {
  346. # 0 (transparent) -> 255 (opaque) in hex
  347. background $black$bar_trans
  348. # border, bg, text color
  349. # focused_workspace $inactive_ws_bg $bg $focused_ws_text
  350. focused_workspace $inactive_ws_bg $bg $fg
  351. # active = focused on other screen
  352. active_workspace $inactive_ws_bg $fg$active_ws_trans $fg
  353. inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg
  354. }
  355. tray_output none
  356. # status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
  357. status_command 2>/tmp/i3blocks.err i3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf | tee /tmp/i3blocks.out
  358. output $benq
  359. wheel_up_cmd nop
  360. wheel_down_cmd nop
  361. }
  362. # }}} benq bar #
  363. # sam bar {{{ #
  364. bar {
  365. output $samsung
  366. font pango:$sb_font 25
  367. # font pango:$sb_font 15
  368. # output $benq
  369. i3bar_command i3bar -t
  370. colors {
  371. background $black$bar_trans
  372. # border, bg, text color
  373. # focused_workspace $inactive_ws_bg $bg $focused_ws_text
  374. focused_workspace $inactive_ws_bg $bg $fg
  375. active_workspace $inactive_ws_bg $fg$active_ws_trans $fg
  376. inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg
  377. }
  378. # status_command i3blocks -c ~/.config/sam-i3blocks/sam-i3blocks.conf
  379. status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/i3blocks/sam-i3blocks.conf | tee /tmp/i3blocks-sam.out
  380. tray_output none
  381. wheel_up_cmd nop
  382. wheel_down_cmd nop
  383. }
  384. # }}} samsung bar #
  385. # # # display {{{ #
  386. # bar {
  387. # i3bar_command i3bar -t
  388. # font pango:$sb_font 23
  389. # tray_output none
  390. # status_command i3blocks -c ~/.config/i3blocks/i3blocks-display.conf
  391. # output $samsung
  392. # wheel_up_cmd nop
  393. # wheel_down_cmd nop
  394. # }
  395. # # }}} display #
  396. # }}} status bar #
  397. # mod key/font {{{ #
  398. set $mod Mod1
  399. # Font for window titles. Will also be used by the bar unless a different font
  400. # is used in the bar {} block below.
  401. # font pango:Hack 11
  402. # font pango:$sb_font 8
  403. font pango:$sb_font 11
  404. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  405. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  406. #font pango:DejaVu Sans Mono 8
  407. # Before i3 v4.8, we used to recommend this one as the default:
  408. # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  409. # The font above is very space-efficient, that is, it looks good, sharp and
  410. # clear in small sizes. However, its unicode glyph coverage is limited, the old
  411. # X core fonts rendering does not support right-to-left and this being a bitmap
  412. # font, it doesn’t scale on retina/hidpi displays.
  413. # }}} mod key/font #
  414. # media keys {{{ #
  415. bindsym control+d exec ~/linux-config/scripts/change-sink dac
  416. # bindsym control+shift+d exec ~/linux-config/scripts/change-sink dac2
  417. bindsym control+o exec ~/linux-config/scripts/change-sink line-out
  418. bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
  419. bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
  420. bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks
  421. # Media player controls
  422. bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
  423. bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
  424. bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
  425. bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
  426. # }}} media keys #