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.

385 lines
12 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
  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. # random bg
  8. exec wal -i "$HOME/Pictures/Backgrounds/dim"
  9. exec imwheel
  10. exec xmodmap ~/.Xmodmap
  11. exec xrdb ~/.Xresources
  12. exec --no-startup-id start-pulseaudio-x11
  13. exec --no-startup-id i3-msg 'workspace $ws2; exec $def_term'
  14. exec --no-startup-id i3-msg 'workspace $ws3; exec $browser'
  15. # exec --no-startup-id i3-msg 'workspace $ws11; exec $swex'
  16. exec_always --no-startup-id numlockx on
  17. # }}} startup #
  18. # applications {{{ #
  19. set $mod Mod1
  20. set $sch_dir "$HOME/Documents/School"
  21. # app shortcuts {{{ #
  22. bindsym Mod4+a exec studio
  23. # bindsym Mod4+1 exec xdotool click --repeat 5 --delay 100 1
  24. # bindsym Mod4+2 exec xdotool click --repeat 10 --delay 100 1
  25. # bindsym Mod4+3 exec xdotool click --repeat 20 --delay 100 1
  26. # bindsym $mod+control+Return exec i3-sensible-terminal
  27. bindsym $mod+control+Return exec $def_term
  28. bindsym Mod4+c exec $browser
  29. bindsym Mod4+f exec firefox
  30. bindsym Mod4+o exec okular
  31. bindsym Mod4+m exec okular $sch_dir/calc-textbook.pdf
  32. bindsym Mod4+n exec nemo
  33. bindsym Mod4+p workspace $ws4; exec pgadmin3
  34. # bindsym Mod4+p exec pycharm
  35. bindsym Mod4+r exec urxvt -e ranger
  36. bindsym control+$mod+s exec systemctl suspend
  37. bindsym Mod4+t exec st
  38. bindsym Mod4+x exec $swex
  39. bindsym Print exec gscreenshot
  40. # }}} app shortcuts #
  41. # redshift {{{ #
  42. bindsym $mod+Mod4+1 exec redshift -x && redshift -O 1000
  43. bindsym $mod+Mod4+2 exec redshift -x && redshift -O 1250
  44. bindsym $mod+Mod4+3 exec redshift -x && redshift -O 1500
  45. bindsym $mod+Mod4+4 exec redshift -x && redshift -O 2000
  46. bindsym $mod+Mod4+5 exec redshift -x && redshift -O 2500
  47. bindsym $mod+Mod4+6 exec redshift -x && redshift -O 3000
  48. bindsym $mod+Mod4+7 exec redshift -x && redshift -O 4000
  49. bindsym $mod+Mod4+8 exec redshift -x && redshift -O 5000
  50. bindsym $mod+Mod4+grave exec redshift -x
  51. # }}} redshift #
  52. # backlight {{{ #
  53. bindsym Shift+F1 exec xbacklight -set 10
  54. bindsym Shift+F2 exec xbacklight -set 20
  55. bindsym Shift+F3 exec xbacklight -set 30
  56. bindsym Shift+F4 exec xbacklight -set 40
  57. bindsym Shift+F5 exec xbacklight -set 50
  58. bindsym Shift+F6 exec xbacklight -set 60
  59. bindsym Shift+F7 exec xbacklight -set 70
  60. bindsym Shift+F8 exec xbacklight -set 80
  61. bindsym Shift+F9 exec xbacklight -set 90
  62. bindsym Shift+F0 exec xbacklight -set 100
  63. # }}} backlight #
  64. # menu {{{ #
  65. # start dmenu (a program launcher)
  66. bindsym Mod4+Return exec dmenu_run
  67. # There also is the (new) i3-dmenu-desktop which only displays applications
  68. # shipping a .desktop file. It is a wrapper around dmenu, so you need that
  69. # installed.
  70. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
  71. # }}} menu #
  72. # Use Mouse+$mod to drag floating windows to their wanted position
  73. floating_modifier $mod
  74. # }}} applications #
  75. # changing/focusing/moving windows {{{ #
  76. # change focus
  77. bindsym control+h focus left
  78. bindsym control+j focus down
  79. bindsym control+k focus up
  80. bindsym control+l focus right
  81. # move workspace to other monitor
  82. bindsym $mod+minus move workspace to output left
  83. bindsym $mod+plus move workspace to output right
  84. # alternatively, you can use the cursor keys:
  85. bindsym $mod+Left focus left
  86. bindsym $mod+Down focus down
  87. bindsym $mod+Up focus up
  88. bindsym $mod+Right focus right
  89. # move focused window
  90. bindsym control+Shift+h move left
  91. bindsym control+Shift+j move down
  92. bindsym control+Shift+k move up
  93. bindsym control+Shift+l move right
  94. # alternatively, you can use the cursor keys:
  95. bindsym $mod+Shift+Left move left
  96. bindsym $mod+Shift+Down move down
  97. bindsym $mod+Shift+Up move up
  98. bindsym $mod+Shift+Right move right
  99. # split in horizontal orientation
  100. bindsym $mod+b split h
  101. # split in vertical orientation
  102. bindsym $mod+v split v
  103. bindsym control+Shift+x kill
  104. # }}} changing/focusing/moving windows #
  105. # container display {{{ #
  106. # backgrounds
  107. bindsym $mod+q exec wal -i "$HOME/Pictures/Backgrounds/vibrant"
  108. bindsym $mod+w exec wal -i "$HOME/Pictures/Backgrounds/dim"
  109. bindsym $mod+r exec wal -i "$HOME/Pictures/Backgrounds/"
  110. bindsym $mod+z exec feh --bg-fill ~/Pictures/Backgrounds/dim/black.jpg
  111. # enter fullscreen mode for the focused container
  112. bindsym $mod+f fullscreen toggle
  113. # change container layout (stacked, tabbed, toggle split)
  114. bindsym $mod+s layout stacking
  115. bindsym $mod+t layout tabbed
  116. bindsym $mod+e layout toggle split
  117. # toggle tiling /floating
  118. bindsym $mod+Shift+space floating toggle
  119. # change focus between tiling / floating windows
  120. bindsym $mod+space focus mode_toggle
  121. # focus the parent container
  122. bindsym $mod+a focus parent
  123. # focus the child container
  124. #bindsym $mod+d focus child
  125. # }}} container display #
  126. # workspace {{{ #
  127. # ws names {{{ #
  128. set $samsung "DVI-I-1"
  129. set $benq "HDMI-1"
  130. set $ws1 "1 "
  131. workspace $ws1 output $benq
  132. bindsym $mod+F1 workspace $ws1; exec $def_term
  133. set $ws2 "2 "
  134. workspace $ws2 output $samsung
  135. bindsym $mod+F2 workspace $ws2; exec $def_term
  136. set $ws3 "3 "
  137. workspace $ws3 output $benq
  138. bindsym $mod+F3 workspace $ws3; exec $browser
  139. set $ws4 "4 "
  140. workspace $ws4 output $samsung
  141. bindsym $mod+F4 workspace $ws4; exec $def_term
  142. set $ws5 "5 "
  143. workspace $ws5 output $samsung
  144. bindsym $mod+F5 workspace $ws5; exec $browser
  145. bindsym Mod4+g workspace $ws5; layout stacking; exec steam
  146. set $ws6 "6 "
  147. workspace $ws6 output $samsung
  148. assign [class="Slack"] $ws6
  149. bindsym Mod4+d workspace $ws6; exec discord
  150. bindsym Mod4+k workspace $ws6; exec slack
  151. set $ws7 "7 "
  152. workspace $ws7 output $samsung
  153. bindsym $mod+F7 workspace $ws7; exec $def_term
  154. set $ws8 "8 "
  155. # assign [class="jetbrains-"] $ws8
  156. bindsym $mod+F8 workspace $ws8; exec $def_term
  157. set $ws9 "9 "
  158. workspace $ws9 output $samsung
  159. bindsym $mod+F9 workspace $ws9; exec $def_term
  160. set $ws10 "10 "
  161. assign [class="spotify"] $ws10
  162. workspace $ws10 output $samsung
  163. bindsym $mod+F10 workspace $ws10; exec $def_term
  164. bindsym Mod4+s workspace $ws10; exec spotify
  165. set $ws11 "11 "
  166. assign [class="Summoners War Exporter"] $ws11
  167. workspace $ws11 output $benq
  168. bindsym $mod+F11 workspace $ws11; exec $def_term
  169. set $ws12 "12 "
  170. bindsym $mod+F12 workspace $ws12; exec $def_term
  171. set $ws13 "13 "
  172. bindsym Mod4+F3 workspace $ws13; exec $def_term
  173. set $ws14 "14"
  174. set $ws15 "15"
  175. # }}} ws names #
  176. # ws bindings {{{ #
  177. # switch to workspace
  178. bindsym $mod+h workspace prev
  179. bindsym $mod+l workspace next
  180. bindsym $mod+1 workspace $ws1
  181. bindsym $mod+2 workspace $ws2
  182. bindsym $mod+3 workspace $ws3
  183. bindsym $mod+4 workspace $ws4
  184. bindsym $mod+5 workspace $ws5
  185. bindsym $mod+6 workspace $ws6
  186. bindsym $mod+7 workspace $ws7
  187. bindsym $mod+8 workspace $ws8
  188. bindsym $mod+9 workspace $ws9
  189. bindsym $mod+0 workspace $ws10
  190. bindsym Mod4+1 workspace $ws11
  191. bindsym Mod4+2 workspace $ws12
  192. bindsym Mod4+3 workspace $ws13
  193. bindsym Mod4+4 workspace $ws14
  194. bindsym Mod4+5 workspace $ws15
  195. # }}} ws bindings #
  196. # move container to ws {{{ #
  197. # move focused container to workspace
  198. # bindsym $mod+control+1 move container to workspace $ws1
  199. bindsym $mod+control+1 move container to workspace $ws1; workspace $ws1
  200. bindsym $mod+control+2 move container to workspace $ws2; workspace $ws2
  201. bindsym $mod+control+3 move container to workspace $ws3; workspace $ws3
  202. bindsym $mod+control+4 move container to workspace $ws4; workspace $ws4
  203. bindsym $mod+control+5 move container to workspace $ws5; workspace $ws5
  204. bindsym $mod+control+6 move container to workspace $ws6; workspace $ws6
  205. bindsym $mod+control+7 move container to workspace $ws7; workspace $ws7
  206. bindsym $mod+control+8 move container to workspace $ws8; workspace $ws8
  207. bindsym $mod+control+9 move container to workspace $ws9; workspace $ws9
  208. bindsym $mod+control+0 move container to workspace $ws10; workspace $ws10
  209. bindsym $mod+Shift+1 move container to workspace $ws11; workspace $ws11
  210. bindsym $mod+Shift+2 move container to workspace $ws12; workspace $ws12
  211. bindsym $mod+Shift+3 move container to workspace $ws13; workspace $ws13
  212. bindsym $mod+Shift+4 move container to workspace $ws14; workspace $ws14
  213. bindsym $mod+Shift+5 move container to workspace $ws15; workspace $ws15
  214. # }}} move container to ws #
  215. # }}} workspace #
  216. # reload config/computer {{{ #
  217. bindsym $mod+Shift+s exec systemctl suspend
  218. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  219. bindsym $mod+control+r restart
  220. # reload the configuration file
  221. bindsym $mod+Shift+c reload
  222. # exit i3 (logs you out of your X session)
  223. 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'"
  224. # }}} reload config #
  225. # resizing windows {{{ #
  226. bindsym $mod+control+h resize grow width 3 px or 3 ppt
  227. bindsym $mod+control+k resize grow height 3 px or 3 ppt
  228. bindsym $mod+control+j resize shrink height 3 px or 3 ppt
  229. bindsym $mod+control+l resize shrink width 3 px or 3 ppt
  230. # }}} resizing windows #
  231. # gaps {{{ #
  232. # remove window titlebars
  233. for_window [class="^.*"] border pixel 5
  234. # for_window [class="^.*"] border pixel 2
  235. set $inner_gaps 30
  236. set $outer_gaps 5
  237. # gaps inner $inner_gaps
  238. # gaps outer $outer_gaps
  239. gaps inner 0
  240. gaps outer 0
  241. # other gaps {{{ #
  242. # gaps horizontal 20
  243. # gaps vertical 10
  244. # gaps top
  245. # gaps left 20
  246. # gaps right 20
  247. # gaps bottom
  248. # }}} other gaps #
  249. bindsym control+shift+plus gaps inner all set $inner_gaps;gaps outer all set $outer_gaps
  250. bindsym control+shift+0 gaps inner all set 0;gaps outer all set 0
  251. # }}} gaps #
  252. # status bar {{{ #
  253. # Start i3bar to display a workspace bar (plus the system information i3status
  254. # finds out, if available)
  255. set $sb_font Hack NF Bold
  256. # benq bar {{{ #
  257. bar {
  258. font pango:$sb_font 20
  259. tray_output none
  260. status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
  261. output $benq
  262. wheel_up_cmd nop
  263. wheel_down_cmd nop
  264. }
  265. # }}} benq bar #
  266. # # display {{{ #
  267. # bar {
  268. # font pango:$sb_font 24
  269. # tray_output none
  270. # status_command i3blocks -c ~/.config/i3blocks/i3blocks-display.conf
  271. # output $samsung
  272. # wheel_up_cmd nop
  273. # wheel_down_cmd nop
  274. # }
  275. # # }}} display #
  276. # samsung bar {{{ #
  277. bar {
  278. output $samsung
  279. # output $benq
  280. status_command i3blocks -c ~/.config/sam-i3blocks/sam-i3blocks.conf
  281. tray_output none
  282. font pango:$sb_font 23
  283. wheel_up_cmd nop
  284. wheel_down_cmd nop
  285. }
  286. # }}} samsung bar #
  287. # }}} status bar #
  288. # mod key/font {{{ #
  289. set $mod Mod1
  290. # Font for window titles. Will also be used by the bar unless a different font
  291. # is used in the bar {} block below.
  292. font pango:Hack 11
  293. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  294. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  295. #font pango:DejaVu Sans Mono 8
  296. # Before i3 v4.8, we used to recommend this one as the default:
  297. # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  298. # The font above is very space-efficient, that is, it looks good, sharp and
  299. # clear in small sizes. However, its unicode glyph coverage is limited, the old
  300. # X core fonts rendering does not support right-to-left and this being a bitmap
  301. # font, it doesn’t scale on retina/hidpi displays.
  302. # }}} mod key/font #
  303. # media keys {{{ #
  304. bindsym $mod+d exec ~/linux-config/change-sink.sh dac
  305. bindsym $mod+o exec ~/linux-config/change-sink.sh line-out
  306. bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -c 0 sset Master 3+
  307. bindsym XF86AudioLowerVolume exec --no-startup-id amixer -c 0 sset Master 3-
  308. bindsym control+$mod+plus exec --no-startup-id amixer -c 2 sset PCM 3+
  309. bindsym control+$mod+minus exec --no-startup-id amixer -c 2 sset PCM 3-
  310. bindsym XF86AudioMute exec --no-startup-id amixer -D pulse set Master 0+ toggle
  311. # Media player controls
  312. bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
  313. bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
  314. bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
  315. bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
  316. # }}} media keys #