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" }}
 20include catppuccin-latte
 21{{- end }}
 22{{- if eq .theme_variant "dark" }}
 23include catppuccin-macchiato
 24{{- end }}
 25# target                 title     bg    text   indicator  border
 26client.focused           $pink     $base $text  $rosewater $pink
 27client.focused_inactive  $mauve    $base $text  $rosewater $mauve
 28client.unfocused         $mauve    $base $text  $rosewater $mauve
 29client.urgent            $peach    $base $peach $overlay0  $peach
 30client.placeholder       $overlay0 $base $text  $overlay0  $overlay0
 31client.background        $base
 32
 33# The combination of xss-lock, nm-applet and pactl is a popular choice, so
 34# they are included here as an example. Modify as you see fit.
 35
 36# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
 37# screen before suspend. Use loginctl lock-session to lock your screen.
 38exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
 39
 40# NetworkManager is the most popular way to manage wireless networks on Linux,
 41# and nm-applet is a desktop environment-independent system tray GUI for it.
 42exec --no-startup-id nm-applet
 43
 44# Use pactl to adjust volume in PulseAudio.
 45set $refresh_i3status killall -SIGUSR1 i3status
 46bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
 47bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
 48bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
 49bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
 50
 51# Use playerctl for media controls
 52bindsym XF86AudioPlay exec playerctl play-pause
 53bindsym XF86AudioNext exec playerctl next
 54bindsym XF86AudioPrev exec playerctl previous
 55
 56# Brightness controls
 57bindsym XF86MonBrightnessUp exec "xbacklight +5"
 58bindsym XF86MonBrightnessDown exec "xbacklight -5"
 59
 60# Screenshot with Flameshot
 61bindsym Print exec flameshot gui
 62
 63# lock screen
 64bindsym $mod+Shift+b exec loginctl lock-session
 65
 66# Use Mouse+$mod to drag floating windows to their wanted position
 67floating_modifier $mod
 68
 69# start a terminal
 70bindsym $mod+Return exec st
 71
 72# open emacsclient
 73bindsym $mod+Shift+Return exec emacsclient -c
 74
 75# scratchpad
 76bindsym $mod+Shift+grave move scratchpad
 77bindsym $mod+grave scratchpad show
 78
 79# kill focused window
 80bindsym $mod+Shift+q kill
 81
 82# start rofi (a program launcher and window switcher)
 83bindsym $mod+shift+z exec "rofi -show run"
 84bindsym $mod+c       exec "rofi -show calc"
 85bindsym $mod+z       exec "rofi -show drun"
 86bindsym $mod+e       exec "rofi -show emoji"
 87bindsym $mod+w       exec "rofi -show window"
 88bindsym $mod+u       exec "rofi -show unicode"
 89bindsym $mod+Shift+e exec "rofi -show kaomoji"
 90
 91# bindings for dunst
 92bindsym $mod+n exec dunstctl close-all
 93bindsym $mod+Shift+n exec dunstctl history-pop
 94bindsym $mod+Ctrl+n exec dunstctl context
 95
 96# change focus
 97bindsym $mod+h focus left
 98bindsym $mod+j focus down
 99bindsym $mod+k focus up
100bindsym $mod+l focus right
101
102# move focused window
103bindsym $mod+Shift+h move left
104bindsym $mod+Shift+j move down
105bindsym $mod+Shift+k move up
106bindsym $mod+Shift+l move right
107
108# split in horizontal orientation
109bindsym $mod+b split horizontal
110
111# split in vertical orientation
112bindsym $mod+v split v
113
114# enter fullscreen mode for the focused container
115bindsym $mod+f fullscreen toggle
116
117# change container layout (stacked, tabbed, toggle split)
118bindsym $mod+t layout tabbed
119bindsym $mod+Shift+s layout toggle split
120
121# toggle floating sticky windows
122bindsym $mod+Mod1+s sticky toggle
123
124# toggle tiling / floating
125bindsym $mod+Shift+space floating toggle
126
127# change focus between tiling / floating windows
128bindsym $mod+space focus mode_toggle
129
130# focus the parent container
131bindsym $mod+a focus parent
132
133# focus the child container
134#bindsym $mod+d focus child
135
136# Define names for default workspaces for which we configure key bindings later on.
137# We use variables to avoid repeating the names in multiple places.
138set $ws1 "1"
139set $ws2 "2"
140set $ws3 "3"
141set $ws4 "4"
142set $ws5 "5"
143set $ws6 "6"
144set $ws7 "7"
145set $ws8 "8"
146set $ws9 "9"
147set $ws10 "10"
148
149# switch to workspace
150bindsym $mod+1 workspace number $ws1
151bindsym $mod+2 workspace number $ws2
152bindsym $mod+3 workspace number $ws3
153bindsym $mod+4 workspace number $ws4
154bindsym $mod+5 workspace number $ws5
155bindsym $mod+6 workspace number $ws6
156bindsym $mod+7 workspace number $ws7
157bindsym $mod+8 workspace number $ws8
158bindsym $mod+9 workspace number $ws9
159bindsym $mod+0 workspace number $ws10
160
161# move focused container to workspace
162bindsym $mod+Shift+1 move container to workspace number $ws1
163bindsym $mod+Shift+2 move container to workspace number $ws2
164bindsym $mod+Shift+3 move container to workspace number $ws3
165bindsym $mod+Shift+4 move container to workspace number $ws4
166bindsym $mod+Shift+5 move container to workspace number $ws5
167bindsym $mod+Shift+6 move container to workspace number $ws6
168bindsym $mod+Shift+7 move container to workspace number $ws7
169bindsym $mod+Shift+8 move container to workspace number $ws8
170bindsym $mod+Shift+9 move container to workspace number $ws9
171bindsym $mod+Shift+0 move container to workspace number $ws10
172
173# reload the configuration file
174bindsym $mod+Shift+c reload
175# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
176bindsym $mod+Shift+r restart
177# exit i3 (logs you out of your X session)
178bindsym $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'"
179
180# window settings
181default_border none
182default_floating_border none
183
184# resize window (you can also use the mouse for that)
185mode "resize" {
186        # These bindings trigger as soon as you enter the resize mode
187
188        # Pressing left will shrink the window’s width.
189        # Pressing right will grow the window’s width.
190        # Pressing up will shrink the window’s height.
191        # Pressing down will grow the window’s height.
192        bindsym h resize shrink width 10 px or 10 ppt
193        bindsym j resize grow height 10 px or 10 ppt
194        bindsym k resize shrink height 10 px or 10 ppt
195        bindsym l resize grow width 10 px or 10 ppt
196
197        # back to normal: Enter or Escape or $mod+r
198        bindsym Return mode "default"
199        bindsym Escape mode "default"
200        bindsym $mod+r mode "default"
201}
202
203bindsym $mod+r mode "resize"
204
205# custom bindings
206bindsym $mod+m exec mpdevil
207bindsym $mod+p exec pavucontrol
208bindsym $mod+o exec obsidian
209
210# workspace bindings
211assign [class="Steam"] $ws4
212assign [class="TelegramDesktop"] $ws6
213assign [class="Gajim"] $ws6
214assign [class="Element"] $ws6
215assign [class="Signal"] $ws6
216assign [class=".*weechat"] $ws6
217assign [class="Hydrus Client"] $ws7
218
219# startup commands
220exec ~/.local/bin/startup-i3