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.

290 lines
9.5 KiB

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