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:Triplicate A 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     $base $text  $rosewater $pink
 75client.focused_inactive  $mauve    $base $text  $rosewater $mauve
 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 st
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"
139
140# bindings for dunst
141bindsym $mod+n exec dunstctl close-all
142bindsym $mod+Shift+n exec dunstctl history-pop
143bindsym $mod+Ctrl+n exec dunstctl context
144
145# change focus
146bindsym $mod+h focus left
147bindsym $mod+j focus down
148bindsym $mod+k focus up
149bindsym $mod+l focus right
150
151# move focused window
152bindsym $mod+Shift+h move left
153bindsym $mod+Shift+j move down
154bindsym $mod+Shift+k move up
155bindsym $mod+Shift+l move right
156
157# split in horizontal orientation
158bindsym $mod+b split horizontal
159
160# split in vertical orientation
161bindsym $mod+v split v
162
163# enter fullscreen mode for the focused container
164bindsym $mod+f fullscreen toggle
165
166# change container layout (stacked, tabbed, toggle split)
167bindsym $mod+t layout tabbed
168bindsym $mod+Shift+s layout toggle split
169
170# toggle floating sticky windows
171bindsym $mod+Mod1+s sticky toggle
172
173# toggle tiling / floating
174bindsym $mod+Shift+space floating toggle
175
176# change focus between tiling / floating windows
177bindsym $mod+space focus mode_toggle
178
179# focus the parent container
180bindsym $mod+a focus parent
181
182# focus the child container
183#bindsym $mod+d focus child
184
185# Define names for default workspaces for which we configure key bindings later on.
186# We use variables to avoid repeating the names in multiple places.
187set $ws1 "1"
188set $ws2 "2"
189set $ws3 "3"
190set $ws4 "4"
191set $ws5 "5"
192set $ws6 "6"
193set $ws7 "7"
194set $ws8 "8"
195set $ws9 "9"
196set $ws10 "10"
197
198# switch to workspace
199bindsym $mod+1 workspace number $ws1
200bindsym $mod+2 workspace number $ws2
201bindsym $mod+3 workspace number $ws3
202bindsym $mod+4 workspace number $ws4
203bindsym $mod+5 workspace number $ws5
204bindsym $mod+6 workspace number $ws6
205bindsym $mod+7 workspace number $ws7
206bindsym $mod+8 workspace number $ws8
207bindsym $mod+9 workspace number $ws9
208bindsym $mod+0 workspace number $ws10
209
210# move focused container to workspace
211bindsym $mod+Shift+1 move container to workspace number $ws1
212bindsym $mod+Shift+2 move container to workspace number $ws2
213bindsym $mod+Shift+3 move container to workspace number $ws3
214bindsym $mod+Shift+4 move container to workspace number $ws4
215bindsym $mod+Shift+5 move container to workspace number $ws5
216bindsym $mod+Shift+6 move container to workspace number $ws6
217bindsym $mod+Shift+7 move container to workspace number $ws7
218bindsym $mod+Shift+8 move container to workspace number $ws8
219bindsym $mod+Shift+9 move container to workspace number $ws9
220bindsym $mod+Shift+0 move container to workspace number $ws10
221
222# reload the configuration file
223bindsym $mod+Shift+c reload
224# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
225bindsym $mod+Shift+r restart
226# exit i3 (logs you out of your X session)
227bindsym $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'"
228
229# window settings
230default_border none
231default_floating_border none
232
233# resize window (you can also use the mouse for that)
234mode "resize" {
235        # These bindings trigger as soon as you enter the resize mode
236
237        # Pressing left will shrink the window’s width.
238        # Pressing right will grow the window’s width.
239        # Pressing up will shrink the window’s height.
240        # Pressing down will grow the window’s height.
241        bindsym h resize shrink width 10 px or 10 ppt
242        bindsym j resize grow height 10 px or 10 ppt
243        bindsym k resize shrink height 10 px or 10 ppt
244        bindsym l resize grow width 10 px or 10 ppt
245
246        # back to normal: Enter or Escape or $mod+r
247        bindsym Return mode "default"
248        bindsym Escape mode "default"
249        bindsym $mod+r mode "default"
250}
251
252bindsym $mod+r mode "resize"
253
254# custom bindings
255bindsym $mod+m exec ymuse
256bindsym $mod+p exec pavucontrol
257bindsym $mod+o exec obsidian
258
259# workspace bindings
260assign [class="Steam"] $ws4
261assign [class="TelegramDesktop"] $ws6
262assign [class="Gajim"] $ws6
263assign [class="Element"] $ws6
264assign [class="Signal"] $ws6
265assign [class=".*weechat"] $ws6
266assign [class="Hydrus Client"] $ws7
267
268# startup commands
269exec ~/.local/bin/startup-i3