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.

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