config.tmpl

  1# This file has been auto-generated by i3-config-wizard(1).
  2# It will not be overwritten, so edit it as you like.
  3#
  4# Should you change your keyboard layout some time, delete
  5# this file and re-run i3-config-wizard(1).
  6#
  7
  8# i3 config file (v4)
  9#
 10# Please see https://i3wm.org/docs/userguide.html for a complete reference!
 11
 12set $mod Mod4
 13
 14# Font for window titles. Will also be used by the bar unless a different font
 15# is used in the bar {} block below.
 16font pango:{{ .font }} 10
 17
 18# https://github.com/catppuccin/i3
 19{{- if eq .theme_variant "light" }}
 20set $rosewater #dc8a78
 21set $flamingo  #dd7878
 22set $pink      #ea76cb
 23set $mauve     #8839ef
 24set $red       #d20f39
 25set $maroon    #e64553
 26set $peach     #fe640b
 27set $green     #40a02b
 28set $teal      #179299
 29set $sky       #04a5e5
 30set $sapphire  #209fb5
 31set $blue      #1e66f5
 32set $lavender  #7287fd
 33set $text      #4c4f69
 34set $subtext1  #5c5f77
 35set $subtext0  #6c6f85
 36set $overlay2  #7c7f93
 37set $overlay1  #8c8fa1
 38set $overlay0  #9ca0b0
 39set $surface2  #acb0be
 40set $surface1  #bcc0cc
 41set $surface0  #ccd0da
 42set $base      #eff1f5
 43set $mantle    #e6e9ef
 44set $crust     #dce0e8
 45{{- end }}
 46{{- if eq .theme_variant "dark" }}
 47set $rosewater #f4dbd6
 48set $flamingo  #f0c6c6
 49set $pink      #f5bde6
 50set $mauve     #c6a0f6
 51set $red       #ed8796
 52set $maroon    #ee99a0
 53set $peach     #f5a97f
 54set $green     #a6da95
 55set $teal      #8bd5ca
 56set $sky       #91d7e3
 57set $sapphire  #7dc4e4
 58set $blue      #8aadf4
 59set $lavender  #b7bdf8
 60set $text      #cad3f5
 61set $subtext1  #b8c0e0
 62set $subtext0  #a5adcb
 63set $overlay2  #939ab7
 64set $overlay1  #8087a2
 65set $overlay0  #6e738d
 66set $surface2  #5b6078
 67set $surface1  #494d64
 68set $surface0  #363a4f
 69set $base      #24273a
 70set $mantle    #1e2030
 71set $crust     #181926
 72{{- end }}
 73# target                 title      bg       text    indicator   border
 74client.focused           $pink      $mantle  $text   $rosewater  $mauve
 75client.focused_inactive  $mauve     $base    $text   $rosewater  $pink
 76client.unfocused         $mauve     $base    $text   $rosewater  $mauve
 77client.urgent            $peach     $base    $peach  $overlay0   $peach
 78client.placeholder       $overlay0  $base    $text   $overlay0   $overlay0
 79client.background        $base
 80
 81# The combination of xss-lock, nm-applet and pactl is a popular choice, so
 82# they are included here as an example. Modify as you see fit.
 83
 84# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
 85# screen before suspend. Use loginctl lock-session to lock your screen.
 86exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
 87
 88# NetworkManager is the most popular way to manage wireless networks on Linux,
 89# and nm-applet is a desktop environment-independent system tray GUI for it.
 90exec --no-startup-id nm-applet
 91
 92# Use pactl to adjust volume in PulseAudio.
 93set $refresh_i3status killall -SIGUSR1 i3status
 94bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
 95bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
 96bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
 97bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
 98bindsym $mod+Next exec --no-startup-id amixer set Capture toggle
 99
100# Use playerctl for media controls
101bindsym XF86AudioPlay exec playerctl play-pause
102bindsym XF86AudioNext exec playerctl next
103bindsym XF86AudioPrev exec playerctl previous
104
105# Brightness controls
106bindsym XF86MonBrightnessUp exec "xbacklight +5"
107bindsym XF86MonBrightnessDown exec "xbacklight -5"
108
109# Screenshot with Flameshot
110bindsym Print exec flameshot gui
111
112# lock screen
113bindsym $mod+Shift+b exec loginctl lock-session
114
115# Use Mouse+$mod to drag floating windows to their wanted position
116floating_modifier $mod
117
118# start a terminal
119bindsym $mod+Return exec ghostty
120
121# open emacsclient
122bindsym $mod+Shift+Return exec emacsclient -c
123
124# scratchpad
125bindsym $mod+Shift+grave move scratchpad
126bindsym $mod+grave scratchpad show
127
128# kill focused window
129bindsym $mod+Shift+q kill
130
131# start rofi (a program launcher and window switcher)
132bindsym $mod+shift+z exec "rofi -show run"
133bindsym $mod+c       exec "rofi -show calc"
134bindsym $mod+z       exec "rofi -show drun"
135bindsym $mod+e       exec "rofi -show emoji"
136bindsym $mod+w       exec "rofi -show window"
137bindsym $mod+u       exec "rofi -show unicode"
138bindsym $mod+Shift+e exec "rofi -show kaomoji"
139bindsym $mod+Shift+p exec "~/.config/rofi/pass.sh"
140
141# bindings for dunst
142bindsym $mod+n exec dunstctl close-all
143bindsym $mod+Shift+n exec dunstctl history-pop
144bindsym $mod+Ctrl+n exec dunstctl context
145
146# change focus
147bindsym $mod+h focus left
148bindsym $mod+j focus down
149bindsym $mod+k focus up
150bindsym $mod+l focus right
151
152# move focused window
153bindsym $mod+Shift+h move left
154bindsym $mod+Shift+j move down
155bindsym $mod+Shift+k move up
156bindsym $mod+Shift+l move right
157
158# split in horizontal orientation
159bindsym $mod+b split horizontal
160
161# split in vertical orientation
162bindsym $mod+v split v
163
164# enter fullscreen mode for the focused container
165bindsym $mod+f fullscreen toggle
166
167# change container layout (stacked, tabbed, toggle split)
168bindsym $mod+t layout tabbed
169bindsym $mod+Shift+s layout toggle split
170
171# toggle floating sticky windows
172bindsym $mod+Mod1+s sticky toggle
173
174# toggle tiling / floating
175bindsym $mod+Shift+space floating toggle
176
177# change focus between tiling / floating windows
178bindsym $mod+space focus mode_toggle
179
180# focus the parent container
181bindsym $mod+a focus parent
182
183# focus the child container
184#bindsym $mod+d focus child
185
186# Define names for default workspaces for which we configure key bindings later on.
187# We use variables to avoid repeating the names in multiple places.
188set $ws1 "1"
189set $ws2 "2"
190set $ws3 "3"
191set $ws4 "4"
192set $ws5 "5"
193set $ws6 "6"
194set $ws7 "7"
195set $ws8 "8"
196set $ws9 "9"
197set $ws10 "10"
198
199# switch to workspace
200bindsym $mod+1 workspace number $ws1
201bindsym $mod+2 workspace number $ws2
202bindsym $mod+3 workspace number $ws3
203bindsym $mod+4 workspace number $ws4
204bindsym $mod+5 workspace number $ws5
205bindsym $mod+6 workspace number $ws6
206bindsym $mod+7 workspace number $ws7
207bindsym $mod+8 workspace number $ws8
208bindsym $mod+9 workspace number $ws9
209bindsym $mod+0 workspace number $ws10
210
211# move focused container to workspace
212bindsym $mod+Shift+1 move container to workspace number $ws1
213bindsym $mod+Shift+2 move container to workspace number $ws2
214bindsym $mod+Shift+3 move container to workspace number $ws3
215bindsym $mod+Shift+4 move container to workspace number $ws4
216bindsym $mod+Shift+5 move container to workspace number $ws5
217bindsym $mod+Shift+6 move container to workspace number $ws6
218bindsym $mod+Shift+7 move container to workspace number $ws7
219bindsym $mod+Shift+8 move container to workspace number $ws8
220bindsym $mod+Shift+9 move container to workspace number $ws9
221bindsym $mod+Shift+0 move container to workspace number $ws10
222
223# reload the configuration file
224bindsym $mod+Shift+c reload
225# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
226bindsym $mod+Shift+r restart
227# exit i3 (logs you out of your X session)
228bindsym $mod+Shift+x 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'"
229
230# window settings
231default_border none
232default_floating_border none
233
234# resize window (you can also use the mouse for that)
235mode "resize" {
236        # These bindings trigger as soon as you enter the resize mode
237
238        # Pressing left will shrink the window’s width.
239        # Pressing right will grow the window’s width.
240        # Pressing up will shrink the window’s height.
241        # Pressing down will grow the window’s height.
242        bindsym h resize shrink width 10 px or 10 ppt
243        bindsym j resize grow height 10 px or 10 ppt
244        bindsym k resize shrink height 10 px or 10 ppt
245        bindsym l resize grow width 10 px or 10 ppt
246
247        # back to normal: Enter or Escape or $mod+r
248        bindsym Return mode "default"
249        bindsym Escape mode "default"
250        bindsym $mod+r mode "default"
251}
252
253bindsym $mod+r mode "resize"
254
255# custom bindings
256bindsym $mod+m exec ymuse
257bindsym $mod+p exec pavucontrol
258bindsym $mod+o exec obsidian
259
260# workspace bindings
261assign [class="Steam"] $ws4
262assign [class="TelegramDesktop"] $ws6
263assign [class="Gajim"] $ws6
264assign [class="Element"] $ws6
265assign [class="Signal"] $ws6
266assign [class=".*weechat"] $ws6
267assign [class="Hydrus Client"] $ws7
268
269# startup commands
270exec ~/.local/bin/startup