config 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. # _ ___
  2. # |_|_ |___ ___ ___ ___ ___
  3. # | |_ |___| . | .'| . |_ -|
  4. # |_|___| |_ |__,| _|___|
  5. # |___| |_|
  6. # 1...............Variables
  7. # 2.........Gaps n' norders
  8. # 3..................Colors
  9. # 4................Bindings
  10. # 5..............Workspaces
  11. # 6.....................Bar
  12. # 7.................Runtime
  13. # -----[ Variables ]----- #
  14. # Modifier Keys (alt & win)
  15. set $mod Mod1
  16. set $win Mod4
  17. set $gaps 10
  18. # Terminal
  19. set $terminal "alacritty --command /usr/bin/zsh"
  20. # File Browser
  21. set $file_browser "alacritty --class vifm --command /usr/bin/zsh -ic vifm"
  22. # Font (window title, bar)
  23. #font pango:scientifica 12
  24. font pango:Hack 12
  25. # -----[ Gaps and Borders ]----- #
  26. # Inner Gapsize (in px)
  27. gaps inner 5
  28. # Outer Gapsize (in px)
  29. gaps outer 5
  30. # Border width (in px)
  31. new_window pixel 2
  32. # -----[ Colors ]----- #
  33. # load color configuration from Xresource file (pywal)
  34. set_from_resource $foreground foreground #292d3e
  35. set_from_resource $background background #292d3e
  36. set_from_resource $base00 color0 #292d3e
  37. set_from_resource $base01 color10 #444267
  38. set_from_resource $base02 color11 #32374d
  39. set_from_resource $base03 color8 #676e95
  40. set_from_resource $base04 color12 #8796b0
  41. set_from_resource $base05 color7 #959dcb
  42. set_from_resource $base06 color13 #959dcb
  43. set_from_resource $base07 color15 #ffffff
  44. set_from_resource $base08 color1 #f07178
  45. set_from_resource $base09 color9 #f78c6c
  46. set_from_resource $base0A color3 #ffcb6b
  47. set_from_resource $base0B color2 #c3e88d
  48. set_from_resource $base0C color6 #89ddff
  49. set_from_resource $base0D color4 #82aaff
  50. set_from_resource $base0E color5 #c792ea
  51. set_from_resource $base0F color14 #ff5370
  52. # -----[ Bindings ]----- #
  53. # Brightness Keys
  54. bindsym XF86MonBrightnessUp exec light -A 15
  55. bindsym XF86MonBrightnessDown exec light -U 15
  56. # Audio Keys - Volume and Mute
  57. bindsym $mod+plus exec --no-startup-id amixer -D pulse sset Master 5%+
  58. bindsym $mod+Shift+plus exec --no-startup-id amixer -D pulse sset Master 15%+
  59. bindsym $mod+minus exec --no-startup-id amixer -D pulse sset Master 5%-
  60. bindsym $mod+Shift+minus exec --no-startup-id amixer -D pulse sset Master 15%-
  61. bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+
  62. bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%-
  63. bindsym XF86AudioMute exec --no-startup-id amixer -D pulse sset Master toggle
  64. # Spotify Control Scripts
  65. bindsym XF86AudioPrev exec --no-startup-id $HOME/.scripts/tools/spotify-ctrl Previous
  66. bindsym XF86AudioPlay exec --no-startup-id $HOME/.scripts/tools/spotify-ctrl Play
  67. bindsym XF86AudioNext exec --no-startup-id $HOME/.scripts/tools/spotify-ctrl Next
  68. # Screenshot script
  69. bindsym Print --release exec --no-startup-id flameshot gui
  70. # this spawns in scratchpad mode!
  71. set $dropdownterm "alacritty --class ddpython -e /bin/bash -ic python"
  72. bindsym $mod+p exec $dropdownterm
  73. # set $dropdownnotes "st -n ddnotes -e /bin/bash -ic 'vim $HOME/projects/internal/notes/todo.md'"
  74. set $dropdownnotes "alacritty --class ddnotes -e /bin/bash -ic 'vim $HOME/projects/internal/notes/todo.md'"
  75. bindsym $mod+n exec $dropdownnotes
  76. # script that shows mounted devices for fast unmount
  77. bindsym $mod+u exec $HOME/.scripts/tools/umount.sh
  78. # unicode emoji finder
  79. bindsym $mod+i exec rofimoji
  80. # yt-mpv
  81. bindsym $mod+y exec $HOME/.scripts/tools/yt-viewer.sh
  82. # Locking the screen
  83. bindsym $win+l exec $HOME/.scripts/i3/lock.sh
  84. # Use Mouse+$mod to drag floating windows to their wanted position
  85. floating_modifier $mod
  86. # Execute terminal
  87. bindsym $mod+Return exec $terminal
  88. # kill focused window ( without shift)
  89. bindsym $mod+q kill
  90. # Scratchpad bindings
  91. # make a terminal a scratchpad window
  92. bindsym $mod+t move scratchpad
  93. # show scratchpad
  94. bindsym $mod+s scratchpad show
  95. # Program launcher and Window switcher
  96. bindsym $mod+d exec "rofi -show combi -show-icons -combi-modi \\"run,drun\\""
  97. bindsym $mod+Tab exec rofi -show window
  98. # Use win+e as filemanager shortcut (using ranger)
  99. bindsym $mod+o exec $file_browser
  100. # change focus (vim bindings)
  101. bindsym $mod+h focus left
  102. bindsym $mod+j focus down
  103. bindsym $mod+k focus up
  104. bindsym $mod+l focus right
  105. # alternatively, you can use the cursor keys:
  106. bindsym $mod+Left focus left
  107. bindsym $mod+Down focus down
  108. bindsym $mod+Up focus up
  109. bindsym $mod+Right focus right
  110. # move focused window
  111. bindsym $mod+Shift+h move left
  112. bindsym $mod+Shift+j move down
  113. bindsym $mod+Shift+k move up
  114. bindsym $mod+Shift+l move right
  115. # alternatively, you can use the cursor keys:
  116. bindsym $mod+Shift+Left move left
  117. bindsym $mod+Shift+Down move down
  118. bindsym $mod+Shift+Up move up
  119. bindsym $mod+Shift+Right move right
  120. # split in vertical and horizontal orientation
  121. bindsym $mod+v split v
  122. bindsym $mod+c split h
  123. # enter fullscreen mode for the focused container
  124. bindsym $mod+f fullscreen toggle
  125. # change container layout (stacked, toggle split)
  126. bindsym $mod+w layout stacking
  127. bindsym $mod+e layout toggle split
  128. bindsym $mod+g gaps inner current set 0;
  129. bindsym $mod+Shift+g gaps inner current set $gaps;
  130. # toggle tiling / floating
  131. bindsym $mod+Shift+space floating toggle
  132. # change focus between tiling / floating windows
  133. bindsym $mod+space focus mode_toggle
  134. # reload the configuration file
  135. bindsym $mod+Shift+c reload
  136. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  137. bindsym $mod+Shift+r restart
  138. # exit i3 (logs you out of your X session)
  139. 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'"
  140. bindsym $mod+Shift+p exec flameshot gui
  141. # Mucho grande resizerino
  142. # Use zuio bindings for resizing on the fly
  143. bindsym $mod+Shift+y resize shrink width 10 px or 10 ppt
  144. bindsym $mod+Shift+u resize grow height 10 px or 10 ppt
  145. bindsym $mod+Shift+i resize shrink height 10 px or 10 ppt
  146. bindsym $mod+Shift+o resize grow width 10 px or 10 ppt
  147. # oldschool resize mode!
  148. bindsym $mod+r mode "resize"
  149. # show screen on laptop screen only (needs autorandr profile 'default')
  150. bindsym $mod+Shift+d exec "autorandr -l default"
  151. # These bindings trigger as soon as you enter the resize mode
  152. mode "resize" {
  153. # resizing using vim bindings
  154. bindsym h resize shrink width 10 px or 10 ppt
  155. bindsym j resize grow height 10 px or 10 ppt
  156. bindsym k resize shrink height 10 px or 10 ppt
  157. bindsym l 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. # -----[ Workspaces ]----- #
  168. # Workspace Strings (only numbers, no unicoderino)
  169. set $ws1 "1"
  170. set $ws2 "2"
  171. set $ws3 "3"
  172. set $ws4 "4"
  173. set $ws5 "5"
  174. set $ws6 "6"
  175. set $ws7 "7"
  176. set $ws8 "8"
  177. set $ws9 "9"
  178. set $ws10 "10"
  179. # switch to workspace
  180. bindsym $mod+1 workspace $ws1;move workspace to output primary;
  181. bindsym $mod+2 workspace $ws2
  182. bindsym $mod+3 workspace $ws3
  183. bindsym $mod+4 workspace $ws4
  184. bindsym $mod+5 workspace $ws5;move workspace to output DP2-3;
  185. bindsym $mod+6 workspace $ws6
  186. bindsym $mod+7 workspace $ws7
  187. bindsym $mod+8 workspace $ws8
  188. bindsym $mod+9 workspace $ws9
  189. bindsym $mod+0 workspace $ws10
  190. # move focused container to workspace
  191. bindsym $mod+Shift+1 move container to workspace 1
  192. bindsym $mod+Shift+2 move container to workspace 2
  193. bindsym $mod+Shift+3 move container to workspace 3
  194. bindsym $mod+Shift+4 move container to workspace 4
  195. bindsym $mod+Shift+5 move container to workspace 5
  196. bindsym $mod+Shift+6 move container to workspace 6
  197. bindsym $mod+Shift+7 move container to workspace 7
  198. bindsym $mod+Shift+8 move container to workspace 8
  199. bindsym $mod+Shift+9 move container to workspace 9
  200. bindsym $mod+Shift+0 move container to workspace 10
  201. # -----[ Bar ]----- #
  202. # Start i3bar to display a workspace bar (plus the system information from i3status)
  203. bar {
  204. # default status string
  205. #i3bar_command i3bar
  206. status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
  207. #status_command i3status -c $HOME/.config/i3status/i3status.conf
  208. font pango:NotoSansMono Nerd Font 8
  209. modifier None
  210. position top
  211. tray_output primary
  212. strip_workspace_numbers yes
  213. # Base16 colors
  214. colors {
  215. background $base00
  216. separator $base01
  217. statusline $base04
  218. # State Border BG Text
  219. focused_workspace $base05 $base0D $base00
  220. active_workspace $base05 $base03 $base00
  221. inactive_workspace $base03 $base01 $base05
  222. urgent_workspace $base08 $base08 $base00
  223. binding_mode $base00 $base0A $base00
  224. }
  225. }
  226. # Colors of the Windows - using base16
  227. # Property Name Border BG Text Indicator Child Border
  228. client.focused $base05 $base0D $base00 $base0D $base0D
  229. client.focused_inactive $base01 $base01 $base05 $base03 $base01
  230. client.unfocused $base01 $base00 $base05 $base01 $base01
  231. client.urgent $base08 $base08 $base00 $base08 $base08
  232. client.placeholder $base00 $base00 $base05 $base00 $base00
  233. client.background $base07
  234. # -----[ Windows ]----- #
  235. # Settings for the drop-drown python instance
  236. for_window [instance="ddpython"] resize set 1000 400
  237. for_window [instance="ddpython"] move scratchpad
  238. for_window [instance="ddpython"] border pixel 3
  239. for_window [instance="ddpython"] sticky enable
  240. for_window [instance="ddpython"] scratchpad show
  241. for_window [instance="ddpython"] floating enable
  242. # MPV floating and fitted
  243. for_window [class="mpv"] resize set 650 370
  244. for_window [class="mpv"] border pixel 3
  245. for_window [class="mpv"] floating enable
  246. for_window [instance="vifm"] resize set 1000 400
  247. for_window [instance="vifm"] border pixel 3
  248. for_window [instance="vifm"] floating enable
  249. # Same procedure for dropdown notes
  250. for_window [instance="ddnotes"] resize set 1100 700
  251. for_window [instance="ddnotes"] move scratchpad
  252. for_window [instance="ddnotes"] border pixel 3
  253. for_window [instance="ddnotes"] sticky enable
  254. for_window [instance="ddnotes"] scratchpad show
  255. for_window [instance="ddnotes"] floating enable
  256. # rdesktop for Windows VM
  257. for_window [instance="^rdesktop.*"] resize set 1100 700
  258. for_window [instance="^rdesktop.*"] move scratchpad
  259. for_window [instance="^rdesktop.*"] border pixel 2
  260. for_window [instance="^rdesktop.*"] sticky enable
  261. for_window [instance="^rdesktop.*"] scratchpad show
  262. for_window [instance="^rdesktop.*"] floating enable
  263. # Minitube (small floating)
  264. for_window [class="Minitube"] resize set 650 370
  265. for_window [class="Minitube"] border pixel 3
  266. for_window [class="Minitube"] floating enable
  267. # ms teams notifications
  268. no_focus [title="Microsoft Teams Notification"]
  269. for_window [title="Microsoft Teams Notification"] floating enable
  270. for_window [title="Microsoft Teams Notification"] resize set 400 150
  271. for_window [title="Microsoft Teams Notification"] move position 1600px 20px
  272. no_focus [title="Microsoft Teams Notification"]
  273. # move them to seperate workspaces
  274. assign [instance="telegram"] 9
  275. assign [instance="spotify"] 8
  276. # YAD
  277. for_window [class="Yad"] floating enable
  278. # -----[ Runtime ]----- #
  279. exec --no-startup-id udiskie -a -n -t # automounting USB sticks
  280. exec --no-startup-id nm-applet # network manager applet
  281. exec --no-startup-id volumeicon # applet for audio
  282. exec --no-startup-id redshift-gtk # bluelight filter
  283. exec --no-startup-id xfce4-power-manager # display power settings
  284. exec_always --no-startup-id wal -R # use wal colorschemes
  285. exec_always --no-startup-id setxkbmap -rules evdev -model evdev -layout us -variant altgr-intl # us-international kb layout
  286. exec_always --no-startup-id autorandr -c --force
  287. exec_always --no-startup-id flameshot
  288. exec_always --no-startup-id xset r rate 400 50 # Speed up keyboard input speed