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.

497 lines
16 KiB

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