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.

311 lines
10 KiB

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