001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# _ _____ __ _
# (_)___ / ___ ___ _ __ / _(_) __ _
# | | |_ \ / __/ _ \| '_ \| |_| |/ _` |
# | |___) | | (_| (_) | | | | _| | (_| |
# |_|____/ \___\___/|_| |_|_| |_|\__, |
# |___/
# Pablo (C) 2024
# Styling #####################################################################
# Snazzy colors
set $color0 #282a36
set $color1 #34353e
set $color2 #43454f
set $color3 #78787e
set $color4 #a5a5a9
set $color5 #e2e4e5
set $color6 #eff0eb
set $color7 #f1f1f0
set $color8 #ff5c57
set $color9 #ff9f43
set $color10 #f3f99d
set $color11 #5af78e
set $color12 #9aedfe
set $color13 #57c7ff
set $color14 #ff6ac1
set $color15 #b2643c
# background: $color0
# foreground: $color5
# accent: $color14
# class border backgr. text indic. child_border
client.background $color0
client.focused $color14 $color0 $color5 $color0 $color14
client.unfocused $color2 $color0 $color5 $color0 $color2
client.focused_inactive $color2 $color0 $color5 $color0 $color2
client.urgent $color2 $color0 $color5 $color0 $color2
client.placeholder $color2 $color0 $color5 $color0 $color2
# hide window borders
default_border pixel 2
# don't have the mouse dictate the active window
focus_follows_mouse no
# draw borders around container only if it is not the only container on this
# workspace
smart_borders on
font pango:IBM Plex Mono 8
# set inner/outer gaps
gaps inner 4
# gaps used if only more than one container on the workspace
smart_gaps off
# Startup #####################################################################
# start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# start the GNOME Keyring daemon
exec dbus-update-activation-environment --all
exec gnome-keyring-daemon --start --components=secrets
# rounded corners and window transparency
exec_always --no-startup-id picom -b --backend xrender
# notification deamon
exec_always --no-startup-id dunst
# prevents the monitor from turning off every once and a while
exec --no-startup-id xset s off
exec --no-startup-id xset -dpms
# go back to lightdm when the lit is closed
exec --no-startup-id light-locker --lock-on-lid
# battery warnings
exec --no-startup-id batsignal -b -w 15 -c 10 -d 0 -f 0 -W 'Battery at 15%' -C 'Battery at 10%' -M 'zenity --warning --title='Low battery levels' --text="%s"'
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
exec --no-startup-id nm-applet
exec --no-startup-id udiskie --tray
exec --no-startup-id transmission-daemon -e $HOME/.local/share/transmission/transmission.log --log-error --log-info
# Bindings ####################################################################
set $mod Mod4
# use custom script to update PulseAudio
bindsym XF86AudioRaiseVolume exec --no-startup-id chvol up -g
bindsym XF86AudioLowerVolume exec --no-startup-id chvol down -g
bindsym XF86AudioMute exec --no-startup-id chvol mute
bindsym XF86AudioMicMute exec --no-startup-id chvol mute-mic
# brighness controls
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10
# use the display key to cycle through different display layouts
bindsym XF86Display exec --no-startup-id mons -n top
# call GnomeScreenshot when I press PrtSc
bindsym Print exec gnome-screenshot -i
# use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# kill focused window
bindsym $mod+Shift+q kill
# start the program launcher
bindsym $mod+d exec --no-startup-id rofi -show combi -run-command "i3-msg exec '{cmd}'" -show-icons
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# split in horizontal orientation
bindsym $mod+Left split h
bindsym $mod+Right split h
# split in vertical orientation
bindsym $mod+Up split v
bindsym $mod+Down split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
# bindsym $mod+Shift+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# names for default workspaces
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1; workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2; workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3; workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4; workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5; workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6; workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7; workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8; workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9; workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10; workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# open Firefox
bindsym $mod+b exec --no-startup-id firefox
# open emoji picker
bindsym $mod+e exec --no-startup-id emojipick
# open math character picker
bindsym $mod+m exec --no-startup-id mathpick
# resize window (you can also use the mouse for that)
mode "resize" {
bindsym h resize shrink width 30 px
bindsym j resize grow height 30 px
bindsym k resize shrink height 30 px
bindsym l resize grow width 30 px
bindsym Shift+h resize shrink width 10 px
bindsym Shift+j resize grow height 10 px
bindsym Shift+k resize shrink height 10 px
bindsym Shift+l resize grow width 10 px
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"