config 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. #-*- mode: i3wm-config -*-
  2. # Bin dir
  3. set $bin $HOME/.bin
  4. # Terminal
  5. set $term kitty
  6. # Display
  7. set $edp1 eDP1
  8. set $hdmi1 HDMI1
  9. set $hdmi2 HDMI-2
  10. set $vga0 VGA-0
  11. # Mod key
  12. set $mod4 Mod4
  13. set $mod1 Mod1
  14. # Font for window titles.
  15. font pango:Terminus 12
  16. # Use Mouse+$mod4 to drag floating windows to their wanted position
  17. floating_modifier $mod4
  18. # %%hotkey: Lanuch rofi as hotkey helper %%
  19. bindsym $mod4+F1 exec $bin/hotkeys i3
  20. # %%hotkey: Launch a terminal %%
  21. bindsym $mod4+Return exec $term --class=Terminal
  22. # %%hotkey: Launch terminal with tmux session %%
  23. bindsym $mod4+Shift+Return exec $term --class=TMux $bin/tmx
  24. # %%hotkey: Launch rofi as program launcher %%
  25. bindsym $mod4+d exec $bin/rofi-run
  26. # %%hotkey: Launch rofi as clipboard manager %%
  27. bindsym $mod4+$mod1+c exec $bin/rofi-clip
  28. # %%hotkey: Launch rofi as password manager %%
  29. bindsym $mod4+$mod1+p exec rofi-pass
  30. # %%hotkey: Launch rofi as systemd manager %%
  31. bindsym $mod4+$mod1+s exec $bin/rofi-systemd
  32. # %%hotkey: Launch rofi as display manager(xrandr) %%
  33. bindsym Control+F8 exec $bin/rofi-xrandr
  34. # %%hotkey: Launch rofi as window switcher %%
  35. bindsym $mod4+Tab exec rofi -show window -width 32
  36. # %%hotkey: Launch rofi as Calc %%
  37. bindsym $mod4+c exec rofi -show calc -modi calc -no-show-match -no-sort
  38. # Programs
  39. ## Ranger
  40. bindsym $mod4+Control+t exec $term --class=Ranger ranger
  41. ## Ncmpcpp
  42. bindsym $mod4+Control+p exec $term --class=Ranger ncmpcpp
  43. ## RTorrent
  44. bindsym $mod4+Control+d exec $term --class=RTorrent rtorrent
  45. ## Emacs
  46. bindsym $mod4+Control+e exec /usr/bin/emacs
  47. # Pulsemixer Control
  48. ## Toggle Mute
  49. bindsym XF86AudioMute exec pulseaudio-ctl mute
  50. ## Increase
  51. bindsym XF86AudioRaiseVolume exec pulseaudio-ctl up
  52. ## Decrease
  53. bindsym XF86AudioLowerVolume exec pulseaudio-ctl down
  54. # kill focused window
  55. bindsym $mod4+Shift+q kill
  56. # Make the currently focused window a scratchpad
  57. bindsym $mod4+m move scratchpad
  58. # Show the first scratchpad window
  59. bindsym $mod4+n scratchpad show
  60. # change focus
  61. bindsym $mod4+j focus left
  62. bindsym $mod4+k focus down
  63. bindsym $mod4+l focus up
  64. bindsym $mod4+h focus right
  65. # alternatively, you can use the cursor keys:
  66. bindsym $mod4+Left focus left
  67. bindsym $mod4+Down focus down
  68. bindsym $mod4+Up focus up
  69. bindsym $mod4+Right focus right
  70. # move focused window
  71. bindsym $mod4+Shift+j move left
  72. bindsym $mod4+Shift+k move down
  73. bindsym $mod4+Shift+l move up
  74. bindsym $mod4+Shift+h move right
  75. # alternatively, you can use the cursor keys:
  76. bindsym $mod4+Shift+Left move left
  77. bindsym $mod4+Shift+Down move down
  78. bindsym $mod4+Shift+Up move up
  79. bindsym $mod4+Shift+Right move right
  80. # split in horizontal orientation
  81. bindsym $mod4+Control+h split h
  82. # split in vertical orientation
  83. bindsym $mod4+Control+v split v
  84. # enter fullscreen mode for the focused container
  85. bindsym $mod4+f fullscreen toggle
  86. # change container layout (stacked, tabbed, toggle split)
  87. bindsym $mod4+s layout stacking
  88. bindsym $mod4+w layout tabbed
  89. bindsym $mod4+e layout toggle split
  90. # toggle tiling / floating
  91. bindsym $mod4+Shift+space floating toggle
  92. # change focus between tiling / floating windows
  93. bindsym $mod4+space focus mode_toggle
  94. # focus the parent container
  95. bindsym $mod4+a focus parent
  96. # focus the child container
  97. #bindsym $mod4+d focus child
  98. set $ws0 0
  99. set $ws1 1
  100. set $ws2 2
  101. set $ws3 3
  102. set $ws4 4
  103. set $ws5 5
  104. set $ws6 6
  105. set $ws7 7
  106. set $ws8 8
  107. set $ws9 9
  108. workspace $ws0 output $hdmi1 $hdmi2
  109. workspace $ws1 output $edp1 $vga0
  110. workspace $ws2 output $edp1 $vga0
  111. workspace $ws3 output $edp1 $vga0
  112. workspace $ws4 output $edp1 $vga0
  113. workspace $ws5 output $edp1 $vga0
  114. workspace $ws6 output $edp1 $vga0
  115. workspace $ws7 output $edp1 $vga0
  116. workspace $ws8 output $epd1 $vga0
  117. workspace $ws9 output $epd1 $vga0
  118. # switch to workspace
  119. bindsym $mod4+1 workspace $ws1
  120. bindsym $mod4+2 workspace $ws2
  121. bindsym $mod4+3 workspace $ws3
  122. bindsym $mod4+4 workspace $ws4
  123. bindsym $mod4+5 workspace $ws5
  124. bindsym $mod4+6 workspace $ws6
  125. bindsym $mod4+7 workspace $ws7
  126. bindsym $mod4+8 workspace $ws8
  127. bindsym $mod4+9 workspace $ws9
  128. # move focused container to workspace
  129. bindsym $mod4+Shift+1 move container to workspace $ws1
  130. bindsym $mod4+Shift+2 move container to workspace $ws2
  131. bindsym $mod4+Shift+3 move container to workspace $ws3
  132. bindsym $mod4+Shift+4 move container to workspace $ws4
  133. bindsym $mod4+Shift+5 move container to workspace $ws5
  134. bindsym $mod4+Shift+6 move container to workspace $ws6
  135. bindsym $mod4+Shift+7 move container to workspace $ws7
  136. bindsym $mod4+Shift+8 move container to workspace $ws8
  137. bindsym $mod4+Shift+9 move container to workspace $ws9
  138. # Switch workspace
  139. bindsym $mod4+Control+Left workspace prev
  140. bindsym $mod4+Control+Right workspace next
  141. # reload the configuration file
  142. bindsym $mod4+Shift+c reload
  143. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  144. bindsym $mod4+Shift+r restarts
  145. # exit i3 (logs you out of your X session)
  146. bindsym $mod4+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'"
  147. # resize window (you can also use the mouse for that)
  148. mode "resize" {
  149. # These bindings trigger as soon as you enter the resize mode
  150. # Pressing left will shrink the window’s width.
  151. # Pressing right will grow the window’s width.
  152. # Pressing up will shrink the window’s height.
  153. # Pressing down will grow the window’s height.
  154. bindsym j resize shrink width 10 px or 10 ppt
  155. bindsym k resize grow height 10 px or 10 ppt
  156. bindsym l resize shrink height 10 px or 10 ppt
  157. bindsym semicolon resize grow width 10 px or 10 ppt
  158. # same bindings, but for the arrow keys
  159. bindsym Left resize shrink width 10 px or 10 ppt
  160. bindsym Down resize grow height 10 px or 10 ppt
  161. bindsym Up resize shrink height 10 px or 10 ppt
  162. bindsym Right resize grow width 10 px or 10 ppt
  163. # back to normal: Enter or Escape
  164. bindsym Return mode "default"
  165. bindsym Escape mode "default"
  166. }
  167. bindsym $mod4+r mode "resize"
  168. exec_always --no-startup-id $bin/panel
  169. # System mode
  170. set $mode_system System [l]ock | l[o]gout | [s]uspend | [r]eboot | [p]oweroff
  171. mode "$mode_system" {
  172. bindsym l exec --no-startup-id $bin/exit lock, mode "default"
  173. bindsym s exec --no-startup-id $bin/exit suspend, mode "default"
  174. bindsym p exec --no-startup-id $bin/exit poweroff, mode "default"
  175. bindsym r exec --no-startup-id $bin/exit reboot, mode "default"
  176. bindsym o exec --no-startup-id $bin/exit logout, mode "default"
  177. # back to normal: Enter or Escape
  178. bindsym Return mode "default"
  179. bindsym Escape mode "default"
  180. }
  181. bindsym $mod4+Escape mode "$mode_system"
  182. # Print Screen mode
  183. set $mode_print System Screen[s]hoots | Screen[c]asts
  184. mode "$mode_print" {
  185. bindsym s exec --no-startup-id teiler --screenshot, mode "default"
  186. bindsym c exec --no-startup-id teiler --togglecast, mode "default"
  187. # back to normal: Enter or Escape
  188. bindsym Return mode "default"
  189. bindsym Escape mode "default"
  190. }
  191. bindsym Print mode "$mode_print"
  192. # <normal|1pixel|pixel xx|none|pixel> #
  193. new_window pixel 1
  194. new_float normal
  195. for_window [class="^.*"] title_format ">_ %title"
  196. for_window [class="^.*"] border pixel 1
  197. # Colors
  198. # class border backgr text indicator child_border
  199. client.focused #333333 #000000 #ffffff #333333 #333333
  200. client.focused_inactive #292929 #000000 #ffffff #292929 #292929
  201. client.unfocused #000000 #000000 #888888 #000000 #000000
  202. client.urgent #CC9393 #000000 #747474 #CC9393 #CC9393
  203. client.placeholder #000000 #000000 #747474 #000000 #0c0c0c
  204. client.background #000000
  205. # Xresources
  206. # exec --no-startup-id xrdb $HOME/.Xresources
  207. # Wallpaper
  208. exec --no-startup-id feh --bg-fill $HOME/.dots/walls/03.jpg
  209. # i3lock Fancy
  210. exec --no-startup-id xss-lock -- i3lock-fancy-dualmonitor -p -f 'PragmataPro-Mono-Regular'
  211. # Clipboard
  212. exec --no-startup-id $bin/clipboard
  213. # udiskie
  214. exec --no-startup-id udiskie
  215. #
  216. exec --no-startup-id xcompmgr -c -C -t-5 -l-5 -r4.2
  217. assign [title="Firefox|Iceweasel|qutebrowser|Webmacs"] $ws1
  218. assign [title="Telegram"] $ws2
  219. assign [class="URxvt" instance="Weechat"] $ws2
  220. assign [class="(?i)tuxcmd|Spacefm|doublecmd|Ranger"] $ws4
  221. assign [class="URxvt" instance="Ranger"] $ws4
  222. assign [class="(?i)St" instance="Ranger"] $ws4
  223. assign [class="(?i)thunderbird|(?i)icedove"] $ws3
  224. assign [class="JDownloader|Syncthing GTK"] $ws5
  225. assign [class="RTorrent"] $ws5
  226. assign [class="URxvt" instance="RTorrent"] $ws5
  227. assign [class="(?i)St" instance="RTorrent"] $ws5
  228. assign [class="Lxappearance|(?i)qt5ct|(?i)AnyDesk"] $ws6
  229. assign [class="Ncmpcpp"] $ws7
  230. assign [class="URxvt" instance="Ncmpcpp"] $ws7
  231. assign [class="(?i)St" instance="Ncmpcpp"] $ws7
  232. assign [class="(?i)mpv|(?i)smplayer|(?i)obs|(?i)cantata"] $ws7
  233. assign [class="(?i)lyx"] $ws8
  234. assign [title="(?i)LibreOffice*"] $ws8
  235. assign [title="GanttProject"] $ws9
  236. assign [class="(?i)emacs"] $ws9
  237. assign [title="zathura"] $ws8
  238. assign [title="nomacs"] $ws7
  239. assign [class="Wine"] $ws6
  240. # Floating
  241. for_window [class="(?i)lxappearance|(?i)qt5ct|(?i)urxvt|(?i)pinentry|(?i)GtkLP|Terminal"] floating enable
  242. for_window [title="(?i)systemsettings"] floating enable
  243. for_window [title="(?i)st"] floating enable
  244. # Tabbed
  245. for_window [title="Firefox|Iceweasel|qutebrowser|Webmacs"] floating disable layout tabbed
  246. for_window [class="URxvt" instance="Ranger|Weechat|RTorrent|Ncmpcpp"] floating disable layout tabbed
  247. for_window [class="(?i)tuxcmd"] floating disable layout tabbed
  248. for_window [title="GanttProject"] floating disable layout tabbed focus
  249. for_window [class="(?i)emacs"] floating disable layout tabbed focus
  250. for_window [title="zathura"] floating disable layout tabbed
  251. for_window [class="(?i)mpv"] floating disable layout tabbed focus
  252. for_window [class="(?i)smplayer"] floating disable layout tabbed focus
  253. # Stuff
  254. # workspace_auto_back_and_forth yes
  255. force_display_urgency_hint 0 ms
  256. focus_on_window_activation urgent
  257. floating_minimum_size -1 x -1
  258. floating_maximum_size -1 x -1
  259. # i3-gaps
  260. gaps inner 2
  261. gaps outer 2