config 12 KB

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