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.

510 lines
17 KiB

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