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+c exec "rofi -show calc"
74bindsym $mod+z exec "rofi -show drun"
75bindsym $mod+e exec "rofi -show emoji"
76bindsym $mod+w exec "rofi -show window"
77bindsym $mod+u exec "rofi -show unicode"
78bindsym $mod+Shift+e exec "rofi -show kaomoji"
79
80# bindings for dunst
81bindsym $mod+n exec dunstctl close-all
82bindsym $mod+Shift+n exec dunstctl history-pop
83bindsym $mod+Ctrl+n exec dunstctl context
84
85# change focus
86bindsym $mod+h focus left
87bindsym $mod+j focus down
88bindsym $mod+k focus up
89bindsym $mod+l focus right
90
91# move focused window
92bindsym $mod+Shift+h move left
93bindsym $mod+Shift+j move down
94bindsym $mod+Shift+k move up
95bindsym $mod+Shift+l move right
96
97# split in horizontal orientation
98bindsym $mod+b split horizontal
99
100# split in vertical orientation
101bindsym $mod+v split v
102
103# enter fullscreen mode for the focused container
104bindsym $mod+f fullscreen toggle
105
106# change container layout (stacked, tabbed, toggle split)
107bindsym $mod+t layout tabbed
108bindsym $mod+Shift+s layout toggle split
109
110# toggle floating sticky windows
111bindsym $mod+Mod1+s sticky toggle
112
113# toggle tiling / floating
114bindsym $mod+Shift+space floating toggle
115
116# change focus between tiling / floating windows
117bindsym $mod+space focus mode_toggle
118
119# focus the parent container
120bindsym $mod+a focus parent
121
122# focus the child container
123#bindsym $mod+d focus child
124
125# Define names for default workspaces for which we configure key bindings later on.
126# We use variables to avoid repeating the names in multiple places.
127set $ws1 "1"
128set $ws2 "2"
129set $ws3 "3"
130set $ws4 "4"
131set $ws5 "5"
132set $ws6 "6"
133set $ws7 "7"
134set $ws8 "8"
135set $ws9 "9"
136set $ws10 "10"
137
138# switch to workspace
139bindsym $mod+1 workspace number $ws1
140bindsym $mod+2 workspace number $ws2
141bindsym $mod+3 workspace number $ws3
142bindsym $mod+4 workspace number $ws4
143bindsym $mod+5 workspace number $ws5
144bindsym $mod+6 workspace number $ws6
145bindsym $mod+7 workspace number $ws7
146bindsym $mod+8 workspace number $ws8
147bindsym $mod+9 workspace number $ws9
148bindsym $mod+0 workspace number $ws10
149
150# move focused container to workspace
151bindsym $mod+Shift+1 move container to workspace number $ws1
152bindsym $mod+Shift+2 move container to workspace number $ws2
153bindsym $mod+Shift+3 move container to workspace number $ws3
154bindsym $mod+Shift+4 move container to workspace number $ws4
155bindsym $mod+Shift+5 move container to workspace number $ws5
156bindsym $mod+Shift+6 move container to workspace number $ws6
157bindsym $mod+Shift+7 move container to workspace number $ws7
158bindsym $mod+Shift+8 move container to workspace number $ws8
159bindsym $mod+Shift+9 move container to workspace number $ws9
160bindsym $mod+Shift+0 move container to workspace number $ws10
161
162# reload the configuration file
163bindsym $mod+Shift+c reload
164# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
165bindsym $mod+Shift+r restart
166# exit i3 (logs you out of your X session)
167bindsym $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'"
168
169# window settings
170default_border none
171default_floating_border none
172
173# resize window (you can also use the mouse for that)
174mode "resize" {
175 # These bindings trigger as soon as you enter the resize mode
176
177 # Pressing left will shrink the window’s width.
178 # Pressing right will grow the window’s width.
179 # Pressing up will shrink the window’s height.
180 # Pressing down will grow the window’s height.
181 bindsym h resize shrink width 10 px or 10 ppt
182 bindsym j resize grow height 10 px or 10 ppt
183 bindsym k resize shrink height 10 px or 10 ppt
184 bindsym l resize grow width 10 px or 10 ppt
185
186 # back to normal: Enter or Escape or $mod+r
187 bindsym Return mode "default"
188 bindsym Escape mode "default"
189 bindsym $mod+r mode "default"
190}
191
192bindsym $mod+r mode "resize"
193
194# custom bindings
195bindsym $mod+m exec mpdevil
196bindsym $mod+p exec pavucontrol
197bindsym $mod+o exec obsidian
198
199# workspace bindings
200assign [class="Steam"] $ws4
201assign [class="TelegramDesktop"] $ws6
202assign [class="Gajim"] $ws6
203assign [class="Element"] $ws6
204assign [class="Signal"] $ws6
205assign [class=".*weechat"] $ws6
206assign [class="Hydrus Client"] $ws7
207
208# startup commands
209exec ~/.local/bin/startup-i3