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.

518 lines
17 KiB

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