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.

493 lines
16 KiB

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