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.

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