-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
340 lines (276 loc) · 14.2 KB
/
config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
####################################################################################################################################
####################################################################################################################################
## _ ____ _____ __ _
## (_)___ \ / ____| / _(_)
## _ __) |_ ___ __ ___ | | ___ _ __ | |_ _ __ _
## | ||__ <\ \ /\ / / '_ ` _ \ | | / _ \| '_ \| _| |/ _` |
## | |___) |\ V V /| | | | | | | |___| (_) | | | | | | | (_| |
## |_|____/ \_/\_/ |_| |_| |_| \_____\___/|_| |_|_| |_|\__, |
## __/ |
## |___/
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
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"
# Enable floating windows for specific applications
for_window [class="(?i)calculator"] floating enable
####################################################################################################################################
####################################################################################################################################
## __ ___ _ _
## / \ / __| |_ __ _ _ _| |_ ___ _ _ _ __
## | () | \__ \ _/ _` | '_| _| |___| | || | '_ \
## \__(_) |___/\__\__,_|_| \__| \_,_| .__/
## |_|
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# 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
# I like my numlock to be on so do this using numlockx
exec_always --no-startup-id numlockx on
# SSH agent script
exec_always ~/.config/i3/gnome-keyring.sh
# Change audio to Razer BlackShark V2 X USB input and output
exec_always ~/.config/i3/set_audio_input.sh
exec_always ~/.config/i3/set_audio_output.sh
# Don't turn my screen off
exec --no-startup-id xset s off
exec --no-startup-id xset -dpms
exec --no-startup-id xset s noblank
####################################################################################################################################
####################################################################################################################################
## _ ___ __ _ _ _ __ _ _ _
## / | | \ ___ / _|__ _ _ _| | |_ | |/ /___ _ _| |__(_)_ _ __| |___
## | |_ | |) / -_) _/ _` | || | | _| | ' </ -_) || | '_ \ | ' \/ _` (_-<
## |_(_) |___/\___|_| \__,_|\_,_|_|\__| |_|\_\___|\_, |_.__/_|_||_\__,_/__/
## |__/
# Configure the modifier Alt Key (Mod1) | Windows Key (Mod4)
set $mod Mod4
# 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
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
# Change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# Alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# Alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# Split in horizontal | vertical orientation
bindsym $mod+h split horizontal
bindsym $mod+v split vertical
# Enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
bindsym $mod+g fullscreen toggle global
# Change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+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
# Focus the child container
#bindsym $mod+d focus child
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# Start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# Kill focused window
bindsym $mod+Shift+q kill
# 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
# Exit i3 (logs you out of your X session)
bindsym $mod+Shift+e 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'"
# Enter resize mode
bindsym $mod+r mode "resize"
# Start dmenu (a program launcher)
bindsym $mod+d exec "dmenu_run -nf '#F5F7F7' -nb '#0B192B' -sb '#F5F7F7' -sf '#2F4C79' -p 'enter program >'"
####################################################################################################################################
####################################################################################################################################
## ___ ___ _ _ __ _ _ _
## |_ ) / __| _ __| |_ ___ _ __ | |/ /___ _ _| |__(_)_ _ __| |___
## / / _ | (_| || (_-< _/ _ \ ' \ | ' </ -_) || | '_ \ | ' \/ _` (_-<
## /___(_) \___\_,_/__/\__\___/_|_|_| |_|\_\___|\_, |_.__/_|_||_\__,_/__/
## |__/
# Move complete workspace
bindsym $mod+m move workspace to output right
bindsym $mod+Shift+m move workspace to output left
bindsym $mod+n move workspace to output down
# Bind flameshot to printscreen
bindsym $mod+p exec flameshot gui
bindsym Print exec flameshot gui
# Enter mode_system
bindsym $mod+Pause mode "$mode_system"
bindsym $mod+Shift+p mode "$mode_display"
# Rename workspace on-the-fly
bindsym $mod+Shift+n exec i3-input -F 'rename workspace to "%s"' -P 'New name: '
# Bind i3lock
#bindsym $mod+Shift+x exec i3lock --color=300a24 -i ~/Pictures/zwaan-cropped_3840x1080.png
# bindsym Pause exec i3lock --color=300a24 -i ~/Pictures/table-cropped_3840x1080.png
# bindsym $mod+Shift+x exec i3lock --color=300a24 -i ~/Pictures/gentlemans-table.png
bindsym $mod+Shift+x exec i3lock --color=300a24 -i ~/Pictures/zwaan.png
bindsym Pause exec --no-startup-id ~/.config/i3/blurred-lock.sh
# Open firefox
bindsym $mod+Shift+f exec firefox
# Open chromefirefox
bindsym $mod+Shift+c exec google-chrome-stable
# Open calculator
bindsym XF86Calculator exec gnome-calculator
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +2% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -2% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Spotify related key bindings
bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
bindsym $mod+XF86AudioLowerVolume exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
bindsym $mod+XF86AudioRaiseVolume exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
####################################################################################################################################
####################################################################################################################################
## ____ _
## |__ / /_\ _ __ _ __ ___ __ _ _ _ __ _ _ _ __ ___
## |_ \_ / _ \| '_ \ '_ \/ -_) _` | '_/ _` | ' \/ _/ -_)
## |___(_) /_/ \_\ .__/ .__/\___\__,_|_| \__,_|_||_\__\___|
## |_| |_|
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Barlow Semi Condensed Medium 12px
# Border size/style
default_border pixel 3
hide_edge_borders smart
# Set a background image using feh
# Note that feh will need to be installed
exec --no-startup-id feh --bg-tile ~/Pictures/repeating-blue-tiger.png
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available) This is the bar at the top
bar {
status_command i3status
colors {
background #0B192B
statusline #F5F7F7
separator #0B192B
focused_workspace #E06236 #E06236 #F5F7F7
active_workspace #F5F7F7 #F5F7F7 #2F4C79
inactive_workspace #5F676A #0B192B #5F676A
urgent_workspace #D7AB61 #D7AB61 #0B192B
binding_mode #D7AB61 #D7AB61 #0B192B
}
}
# Change the colors of the i3 windows, for more info on this
# see https://i3wm.org/docs/userguide.html#_changing_colors
# border bground text indicator child_border
client.focused #E06236 #E06236 #F5F7F7 #F5F7F7 #E06236
client.focused_inactive #F5F7F7 #F5F7F7 #0B192B #D7AB61 #F5F7F7
client.unfocused #5F676A #0B192B #5F676A #5F676A #5F676A
client.urgent #D7AB61 #D7AB61 #F5F7F7 #D7AB61 #D7AB61
client.placeholder #000000 #0C0C0C #F5F7F7 #000000 #0C0C0C
client.background #F5F7F7
# Gaps
gaps inner 12
gaps outer 0
smart_gaps on
####################################################################################################################################
####################################################################################################################################
## _ _ __ __ _
## | | | | \/ |___ __| |___ ___
## |_ _| | |\/| / _ \/ _` / -_|_-<
## |_(_) |_| |_\___/\__,_\___/__/
##
# Resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 5 px or 5 ppt
bindsym Down resize grow height 5 px or 5 ppt
bindsym Up resize shrink height 5 px or 5 ppt
bindsym Right resize grow width 5 px or 5 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
# This mode allows one to control the screen layout, given the scripts exist
# To generate these scripts, use arandr and extract. Then move in this folder and chmod 777
set $mode_display Display (e) External Only, (i) Internal Only, (h) Home mode, (a) All
mode "$mode_display" {
bindsym e exec --no-startup-id ~/.config/i3/display-external.sh, mode "default"
bindsym a exec --no-startup-id ~/.config/i3/display-all.sh, mode "default"
bindsym i exec --no-startup-id ~/.config/i3/display-internal.sh, mode "default"
bindsym h exec --no-startup-id ~/.config/i3/display-home.sh, mode "default"
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
}
# This mode allows one to control the power of the device
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id $Locker, mode "default"
bindsym e exec --no-startup-id i3-msg exit, mode "default"
bindsym s exec --no-startup-id $Locker && systemctl suspend, mode "default"
bindsym h exec --no-startup-id $Locker && systemctl hibernate, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
set $Locker i3lock && sleep 1