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.

283 lines
9.4 KiB

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