config 13 KB

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