config 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  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. # Locking the screen
  79. bindsym $win+l exec $HOME/.scripts/i3/lock.sh
  80. # Cheatsheet chose
  81. bindsym $mod+i exec $HOME/documents/bin/cheat.sh -i
  82. # Use Mouse+$mod to drag floating windows to their wanted position
  83. floating_modifier $mod
  84. # Execute terminal
  85. bindsym $mod+Return exec $terminal
  86. # kill focused window ( without shift)
  87. bindsym $mod+q kill
  88. # Scratchpad bindings
  89. # make a terminal a scratchpad window
  90. bindsym $mod+t move scratchpad
  91. # show scratchpad
  92. bindsym $mod+s scratchpad show
  93. # Program launcher and Window switcher
  94. bindsym $mod+d exec /usr/bin/zsh -c "rofi -show run"
  95. bindsym $mod+Tab exec rofi -show window
  96. # Use win+e as filemanager shortcut (using ranger)
  97. bindsym $mod+o exec $file_browser
  98. # change focus (vim bindings)
  99. bindsym $mod+h focus left
  100. bindsym $mod+j focus down
  101. bindsym $mod+k focus up
  102. bindsym $mod+l focus right
  103. # alternatively, you can use the cursor keys:
  104. bindsym $mod+Left focus left
  105. bindsym $mod+Down focus down
  106. bindsym $mod+Up focus up
  107. bindsym $mod+Right focus right
  108. # move focused window
  109. bindsym $mod+Shift+h move left
  110. bindsym $mod+Shift+j move down
  111. bindsym $mod+Shift+k move up
  112. bindsym $mod+Shift+l move right
  113. # alternatively, you can use the cursor keys:
  114. bindsym $mod+Shift+Left move left
  115. bindsym $mod+Shift+Down move down
  116. bindsym $mod+Shift+Up move up
  117. bindsym $mod+Shift+Right move right
  118. # split in vertical and horizontal orientation
  119. bindsym $mod+v split v
  120. bindsym $mod+c split h
  121. # enter fullscreen mode for the focused container
  122. bindsym $mod+f fullscreen toggle
  123. # change container layout (stacked, toggle split)
  124. bindsym $mod+w layout stacking
  125. bindsym $mod+e layout toggle split
  126. bindsym $mod+g gaps inner current set 0;
  127. bindsym $mod+Shift+g gaps inner current set $gaps;
  128. # toggle tiling / floating
  129. bindsym $mod+Shift+space floating toggle
  130. # change focus between tiling / floating windows
  131. bindsym $mod+space focus mode_toggle
  132. # reload the configuration file
  133. bindsym $mod+Shift+c reload
  134. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  135. bindsym $mod+Shift+r restart
  136. # exit i3 (logs you out of your X session)
  137. 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'"
  138. bindsym $mod+Shift+p exec flameshot gui
  139. # Mucho grande resizerino
  140. # Use zuio bindings for resizing on the fly
  141. bindsym $mod+Shift+y resize shrink width 10 px or 10 ppt
  142. bindsym $mod+Shift+u resize grow height 10 px or 10 ppt
  143. bindsym $mod+Shift+i resize shrink height 10 px or 10 ppt
  144. bindsym $mod+Shift+o resize grow width 10 px or 10 ppt
  145. # oldschool resize mode!
  146. bindsym $mod+r mode "resize"
  147. # These bindings trigger as soon as you enter the resize mode
  148. mode "resize" {
  149. # resizing using vim bindings
  150. bindsym h resize shrink width 10 px or 10 ppt
  151. bindsym j resize grow height 10 px or 10 ppt
  152. bindsym k resize shrink height 10 px or 10 ppt
  153. bindsym l resize grow width 10 px or 10 ppt
  154. # same bindings, but for the arrow keys
  155. bindsym Left resize shrink width 10 px or 10 ppt
  156. bindsym Down resize grow height 10 px or 10 ppt
  157. bindsym Up resize shrink height 10 px or 10 ppt
  158. bindsym Right resize grow width 10 px or 10 ppt
  159. # back to normal: Enter or Escape
  160. bindsym Return mode "default"
  161. bindsym Escape mode "default"
  162. }
  163. # -----[ Workspaces ]----- #
  164. # Workspace Strings (only numbers, no unicoderino)
  165. set $ws1 "1"
  166. set $ws2 "2"
  167. set $ws3 "3"
  168. set $ws4 "4"
  169. set $ws5 "5"
  170. set $ws6 "6"
  171. set $ws7 "7"
  172. set $ws8 "8"
  173. set $ws9 "9"
  174. set $ws10 "10"
  175. # switch to workspace
  176. bindsym $mod+1 workspace $ws1;move workspace to output primary;
  177. bindsym $mod+2 workspace $ws2
  178. bindsym $mod+3 workspace $ws3
  179. bindsym $mod+4 workspace $ws4
  180. bindsym $mod+5 workspace $ws5;move workspace to output DP2-3;
  181. bindsym $mod+6 workspace $ws6
  182. bindsym $mod+7 workspace $ws7
  183. bindsym $mod+8 workspace $ws8
  184. bindsym $mod+9 workspace $ws9
  185. bindsym $mod+0 workspace $ws10
  186. # move focused container to workspace
  187. bindsym $mod+Shift+1 move container to workspace 1
  188. bindsym $mod+Shift+2 move container to workspace 2
  189. bindsym $mod+Shift+3 move container to workspace 3
  190. bindsym $mod+Shift+4 move container to workspace 4
  191. bindsym $mod+Shift+5 move container to workspace 5
  192. bindsym $mod+Shift+6 move container to workspace 6
  193. bindsym $mod+Shift+7 move container to workspace 7
  194. bindsym $mod+Shift+8 move container to workspace 8
  195. bindsym $mod+Shift+9 move container to workspace 9
  196. bindsym $mod+Shift+0 move container to workspace 10
  197. # -----[ Bar ]----- #
  198. # Start i3bar to display a workspace bar (plus the system information from i3status)
  199. bar {
  200. # default status string
  201. #i3bar_command i3bar
  202. status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
  203. #status_command i3status -c $HOME/.config/i3status/i3status.conf
  204. font pango:NotoSansMono Nerd Font 8
  205. modifier None
  206. position top
  207. tray_output primary
  208. strip_workspace_numbers yes
  209. # Base16 colors
  210. colors {
  211. background $base00
  212. separator $base01
  213. statusline $base04
  214. # State Border BG Text
  215. focused_workspace $base05 $base0D $base00
  216. active_workspace $base05 $base03 $base00
  217. inactive_workspace $base03 $base01 $base05
  218. urgent_workspace $base08 $base08 $base00
  219. binding_mode $base00 $base0A $base00
  220. }
  221. }
  222. # Colors of the Windows - using base16
  223. # Property Name Border BG Text Indicator Child Border
  224. client.focused $base05 $base0D $base00 $base0D $base0D
  225. client.focused_inactive $base01 $base01 $base05 $base03 $base01
  226. client.unfocused $base01 $base00 $base05 $base01 $base01
  227. client.urgent $base08 $base08 $base00 $base08 $base08
  228. client.placeholder $base00 $base00 $base05 $base00 $base00
  229. client.background $base07
  230. # -----[ Windows ]----- #
  231. # Settings for the drop-drown python instance
  232. for_window [instance="ddpython"] resize set 1000 400
  233. for_window [instance="ddpython"] move scratchpad
  234. for_window [instance="ddpython"] border pixel 3
  235. for_window [instance="ddpython"] sticky enable
  236. for_window [instance="ddpython"] scratchpad show
  237. for_window [instance="ddpython"] floating enable
  238. # MPV floating and fitted
  239. for_window [class="mpv"] resize set 650 370
  240. for_window [class="mpv"] border pixel 3
  241. for_window [class="mpv"] floating enable
  242. for_window [instance="vifm"] resize set 1000 400
  243. for_window [instance="vifm"] border pixel 3
  244. for_window [instance="vifm"] floating enable
  245. # Same procedure for dropdown notes
  246. for_window [instance="ddnotes"] resize set 1100 700
  247. for_window [instance="ddnotes"] move scratchpad
  248. for_window [instance="ddnotes"] border pixel 3
  249. for_window [instance="ddnotes"] sticky enable
  250. for_window [instance="ddnotes"] scratchpad show
  251. for_window [instance="ddnotes"] floating enable
  252. # rdesktop for Windows VM
  253. for_window [instance="^rdesktop.*"] resize set 1100 700
  254. for_window [instance="^rdesktop.*"] move scratchpad
  255. for_window [instance="^rdesktop.*"] border pixel 2
  256. for_window [instance="^rdesktop.*"] sticky enable
  257. for_window [instance="^rdesktop.*"] scratchpad show
  258. for_window [instance="^rdesktop.*"] floating enable
  259. no_focus [title="Microsoft Teams Notification"]
  260. for_window [title="Microsoft Teams Notification"] floating enable
  261. for_window [title="Microsoft Teams Notification"] resize set 400 150
  262. for_window [title="Microsoft Teams Notification"] move position 1600px 20px
  263. no_focus [title="Microsoft Teams Notification"]
  264. # move them to seperate workspaces
  265. assign [instance="telegram"] 9
  266. assign [instance="spotify"] 8
  267. # -----[ Runtime ]----- #
  268. exec --no-startup-id nm-applet # network manager applet
  269. exec --no-startup-id volumeicon # applet for audio
  270. exec --no-startup-id xfce4-power-manager # display power settings
  271. exec_always --no-startup-id wal -R # use wal colorschemes
  272. exec_always --no-startup-id setxkbmap -rules evdev -model evdev -layout us -variant altgr-intl # us-international kb layout
  273. exec_always --no-startup-id autorandr -c --force
  274. exec_always --no-startup-id flameshot