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.

267 lines
8.7 KiB

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