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.

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