config 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  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 xbacklight +10
  55. bindsym XF86MonBrightnessDown exec xbacklight -10
  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 python2"
  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. # unicode emoji finder
  77. bindsym $mod+u exec $HOME/.scripts/i3/unicode.sh
  78. # yt-mpv
  79. bindsym $mod+y exec $HOME/.scripts/tools/yt-viewer.sh
  80. # Locking the screen
  81. bindsym $win+l exec $HOME/.scripts/i3/lock.sh
  82. # Cheatsheet chose
  83. bindsym $mod+i exec $HOME/documents/bin/cheat.sh -i
  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 /usr/bin/zsh -c "rofi -show run"
  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. # These bindings trigger as soon as you enter the resize mode
  150. mode "resize" {
  151. # resizing using vim bindings
  152. bindsym h resize shrink width 10 px or 10 ppt
  153. bindsym j resize grow height 10 px or 10 ppt
  154. bindsym k resize shrink height 10 px or 10 ppt
  155. bindsym l resize grow width 10 px or 10 ppt
  156. # same bindings, but for the arrow keys
  157. bindsym Left resize shrink width 10 px or 10 ppt
  158. bindsym Down resize grow height 10 px or 10 ppt
  159. bindsym Up resize shrink height 10 px or 10 ppt
  160. bindsym Right resize grow width 10 px or 10 ppt
  161. # back to normal: Enter or Escape
  162. bindsym Return mode "default"
  163. bindsym Escape mode "default"
  164. }
  165. # -----[ Workspaces ]----- #
  166. # Workspace Strings (only numbers, no unicoderino)
  167. set $ws1 "1"
  168. set $ws2 "2"
  169. set $ws3 "3"
  170. set $ws4 "4"
  171. set $ws5 "5"
  172. set $ws6 "6"
  173. set $ws7 "7"
  174. set $ws8 "8"
  175. set $ws9 "9"
  176. set $ws10 "10"
  177. # switch to workspace
  178. bindsym $mod+1 workspace $ws1;move workspace to output primary;
  179. bindsym $mod+2 workspace $ws2
  180. bindsym $mod+3 workspace $ws3
  181. bindsym $mod+4 workspace $ws4
  182. bindsym $mod+5 workspace $ws5;move workspace to output DP2-3;
  183. bindsym $mod+6 workspace $ws6
  184. bindsym $mod+7 workspace $ws7
  185. bindsym $mod+8 workspace $ws8
  186. bindsym $mod+9 workspace $ws9
  187. bindsym $mod+0 workspace $ws10
  188. # move focused container to workspace
  189. bindsym $mod+Shift+1 move container to workspace 1
  190. bindsym $mod+Shift+2 move container to workspace 2
  191. bindsym $mod+Shift+3 move container to workspace 3
  192. bindsym $mod+Shift+4 move container to workspace 4
  193. bindsym $mod+Shift+5 move container to workspace 5
  194. bindsym $mod+Shift+6 move container to workspace 6
  195. bindsym $mod+Shift+7 move container to workspace 7
  196. bindsym $mod+Shift+8 move container to workspace 8
  197. bindsym $mod+Shift+9 move container to workspace 9
  198. bindsym $mod+Shift+0 move container to workspace 10
  199. # -----[ Bar ]----- #
  200. # Start i3bar to display a workspace bar (plus the system information from i3status)
  201. bar {
  202. # default status string
  203. #i3bar_command i3bar
  204. status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
  205. #status_command i3status -c $HOME/.config/i3status/i3status.conf
  206. font pango:NotoSansMono Nerd Font 8
  207. modifier None
  208. position top
  209. tray_output primary
  210. strip_workspace_numbers yes
  211. # Base16 colors
  212. colors {
  213. background $base00
  214. separator $base01
  215. statusline $base04
  216. # State Border BG Text
  217. focused_workspace $base05 $base0D $base00
  218. active_workspace $base05 $base03 $base00
  219. inactive_workspace $base03 $base01 $base05
  220. urgent_workspace $base08 $base08 $base00
  221. binding_mode $base00 $base0A $base00
  222. }
  223. }
  224. # Colors of the Windows - using base16
  225. # Property Name Border BG Text Indicator Child Border
  226. client.focused $base05 $base0D $base00 $base0D $base0D
  227. client.focused_inactive $base01 $base01 $base05 $base03 $base01
  228. client.unfocused $base01 $base00 $base05 $base01 $base01
  229. client.urgent $base08 $base08 $base00 $base08 $base08
  230. client.placeholder $base00 $base00 $base05 $base00 $base00
  231. client.background $base07
  232. # -----[ Windows ]----- #
  233. # Settings for the drop-drown python instance
  234. for_window [instance="ddpython"] resize set 1000 400
  235. for_window [instance="ddpython"] move scratchpad
  236. for_window [instance="ddpython"] border pixel 3
  237. for_window [instance="ddpython"] sticky enable
  238. for_window [instance="ddpython"] scratchpad show
  239. for_window [instance="ddpython"] floating enable
  240. # MPV floating and fitted
  241. for_window [class="mpv"] resize set 650 370
  242. for_window [class="mpv"] border pixel 3
  243. for_window [class="mpv"] floating enable
  244. for_window [instance="vifm"] resize set 1000 400
  245. for_window [instance="vifm"] border pixel 3
  246. for_window [instance="vifm"] floating enable
  247. # Same procedure for dropdown notes
  248. for_window [instance="ddnotes"] resize set 1100 700
  249. for_window [instance="ddnotes"] move scratchpad
  250. for_window [instance="ddnotes"] border pixel 3
  251. for_window [instance="ddnotes"] sticky enable
  252. for_window [instance="ddnotes"] scratchpad show
  253. for_window [instance="ddnotes"] floating enable
  254. # rdesktop for Windows VM
  255. for_window [instance="^rdesktop.*"] resize set 1100 700
  256. for_window [instance="^rdesktop.*"] move scratchpad
  257. for_window [instance="^rdesktop.*"] border pixel 2
  258. for_window [instance="^rdesktop.*"] sticky enable
  259. for_window [instance="^rdesktop.*"] scratchpad show
  260. for_window [instance="^rdesktop.*"] floating enable
  261. no_focus [title="Microsoft Teams Notification"]
  262. for_window [title="Microsoft Teams Notification"] floating enable
  263. for_window [title="Microsoft Teams Notification"] resize set 400 150
  264. for_window [title="Microsoft Teams Notification"] move position 1600px 20px
  265. no_focus [title="Microsoft Teams Notification"]
  266. # move them to seperate workspaces
  267. assign [instance="telegram"] 9
  268. assign [instance="spotify"] 8
  269. # -----[ Runtime ]----- #
  270. exec --no-startup-id udiskie -a -n -t # automounting USB sticks
  271. exec --no-startup-id nm-applet # network manager applet
  272. exec --no-startup-id volumeicon # applet for audio
  273. exec --no-startup-id xfce4-power-manager # display power settings
  274. exec_always --no-startup-id wal -R # use wal colorschemes
  275. exec_always --no-startup-id setxkbmap -rules evdev -model evdev -layout us -variant altgr-intl # us-international kb layout
  276. exec_always --no-startup-id autorandr -c --force
  277. exec_always --no-startup-id flameshot