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