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.

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