forked from sainathadapa/i3-wm-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
492 lines (392 loc) · 18.1 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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod4
# Set key folder paths
set $i3path ~/.i3
set $i3multipath ~/.i3/i3_wm_multi_disp_scripts
# set default desktop layout (default is tiling)
workspace_layout stacked
# Configure border style <normal|1pixel|pixel xx|none|pixel>
new_window pixel 1
new_float normal
# Hides vertical and horizontal borders when there's only one window.
hide_edge_borders none
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# font xft:URWGothic-Book 11
font pango: Source Code Pro 10
# Use Mouse+$mod to drag floating windows
floating_modifier $mod
# https://i3wm.org/docs/userguide.html#_focus_wrapping
force_focus_wrapping yes
# Assume you are on workspace "1: www" and switch to "2: IM" using mod+2
# because somebody sent you a message. You don’t need to remember
# where you came from now, you can just press $mod+2 again to switch back to "1: www".
workspace_auto_back_and_forth yes
# turn on mouse following
focus_follows_mouse yes
# start a terminal
bindsym $mod+Return exec terminal
# screenshots
bindsym Print exec --no-startup-id i3-scrot
bindsym $mod+Print --release exec --no-startup-id i3-scrot -s
# kill focused window
bindsym F4 kill
################################################################################################
## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ##
################################################################################################
exec --no-startup-id volumeicon
# bindsym $mod+Ctrl+m exec terminal -e 'alsamixer'
#exec --no-startup-id pulseaudio
#exec --no-startup-id pa-applet
#bindsym $mod+Ctrl+m exec pavucontrol
################################################################################################
# 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
# Set shut down, restart and locking features
bindsym $mod+minus mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym h exec --no-startup-id i3exit hibernate, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
# resize window (you can also use the mouse for that)
mode "resize" {
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym Left resize shrink width 5 px or 5 ppt
bindsym Down resize shrink height 5 px or 5 ppt
bindsym Up resize grow height 5 px or 5 ppt
bindsym Right resize grow width 5 px or 5 ppt
bindsym h resize shrink width 1 px or 1 ppt
bindsym j resize shrink height 1 px or 1 ppt
bindsym k resize grow height 1 px or 1 ppt
bindsym l resize grow width 1 px or 1 ppt
}
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+d focus child
# change container layout
bindsym $mod+e layout toggle all
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# split in horizontal orientation
bindsym $mod+t split h;exec notify-send 'tile horizontally'
# Resize mode
bindsym $mod+r mode "resize"
# toggle touchpad
bindsym $mod+s exec $i3path/utils/touchpad_toggle.sh
# small window for videos
bindsym $mod+u fullscreen disable; floating enable; resize set 800 450; sticky enable; move position 870 25
# split in vertical orientation
bindsym $mod+y split v;exec notify-send 'tile vertically'
# Toggle border
bindsym $mod+x border toggle
# Show the first scratchpad window
bindsym $mod+z scratchpad show
# Lock the system
bindsym $mod+q exec i3lock -i $i3path/i3-lock-screen.png -t -f
# bindsym $mod+q exec --no-startup-id blurlock
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# switch to workspace
bindsym $mod+KP_1 workspace number 1
bindsym $mod+KP_2 workspace number 2
bindsym $mod+KP_3 workspace number 3
bindsym $mod+KP_4 workspace number 4
bindsym $mod+KP_5 workspace number 5
bindsym $mod+KP_6 workspace number 6
bindsym $mod+KP_7 workspace number 7
bindsym $mod+KP_8 workspace number 8
bindsym $mod+KP_9 workspace number 9
bindsym $mod+KP_0 workspace number 0
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 0
# move focused container to workspace
bindsym $mod+Shift+KP_1 move container to workspace number 1
bindsym $mod+Shift+KP_2 move container to workspace number 2
bindsym $mod+Shift+KP_3 move container to workspace number 3
bindsym $mod+Shift+KP_4 move container to workspace number 4
bindsym $mod+Shift+KP_5 move container to workspace number 5
bindsym $mod+Shift+KP_6 move container to workspace number 6
bindsym $mod+Shift+KP_7 move container to workspace number 7
bindsym $mod+Shift+KP_8 move container to workspace number 8
bindsym $mod+Shift+KP_9 move container to workspace number 8
bindsym $mod+Shift+KP_0 move container to workspace number 8
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 0
# 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'"
mode "mouse" {
# set your three speeds here
set $slow 1
set $quick 10
set $fast 50
# Mouse movement (slow/fine-tuned) -- vim keybindings
bindsym h exec xdotool mousemove_relative -- -$slow 0
bindsym j exec xdotool mousemove_relative 0 $slow
bindsym k exec xdotool mousemove_relative -- 0 -$slow
bindsym l exec xdotool mousemove_relative $slow 0
# Mouse movement (slow/fine-tuned) -- arrow keys
bindsym Left exec xdotool mousemove_relative -- -$slow 0
bindsym Down exec xdotool mousemove_relative 0 $slow
bindsym Up exec xdotool mousemove_relative -- 0 -$slow
bindsym Right exec xdotool mousemove_relative $slow 0
# Mouse movement (quicker) -- vim keybindings
bindsym Shift+h exec xdotool mousemove_relative -- -$quick 0
bindsym Shift+j exec xdotool mousemove_relative 0 $quick
bindsym Shift+k exec xdotool mousemove_relative -- 0 -$quick
bindsym Shift+l exec xdotool mousemove_relative $quick 0
# Mouse movement (quicker) -- arrow keys
bindsym Shift+Left exec xdotool mousemove_relative -- -$quick 0
bindsym Shift+Down exec xdotool mousemove_relative 0 $quick
bindsym Shift+Up exec xdotool mousemove_relative -- 0 -$quick
bindsym Shift+Right exec xdotool mousemove_relative $quick 0
# Mouse movement (fast) -- vim keybindings
bindsym Shift+$mod2+h exec xdotool mousemove_relative -- -$fast 0
bindsym Shift+$mod2+j exec xdotool mousemove_relative 0 $fast
bindsym Shift+$mod2+k exec xdotool mousemove_relative -- 0 -$fast
bindsym Shift+$mod2+l exec xdotool mousemove_relative $fast 0
# Mouse movement (fast) -- arrow keys
bindsym Shift+$mod2+Left exec xdotool mousemove_relative -- -$fast 0
bindsym Shift+$mod2+Down exec xdotool mousemove_relative 0 $fast
bindsym Shift+$mod2+Up exec xdotool mousemove_relative -- 0 -$fast
bindsym Shift+$mod2+Right exec xdotool mousemove_relative $fast 0
# Mouse movement (special down-right)
bindsym m exec xdotool mousemove_relative 10 10
# Left Click
bindsym f exec xdotool click 1
# Middle Click
bindsym d exec xdotool click 2
# Right Click
bindsym s exec xdotool click 3
# Left Click-and-drag
bindsym Shift+f exec xdotool mousedown 1
# Middle Click-and-drag
bindsym Shift+d exec xdotool mousedown 2
# Right Click-and-drag
bindsym Shift+s exec xdotool mousedown 3
# Left Drag release
bindsym $mod2+f exec xdotool mouseup 1
# Middle Drag release
bindsym $mod2+d exec xdotool mouseup 2
# Right Drag release
bindsym $mod2+s exec xdotool mouseup 3
# return to normal keybindings -- IMPORTANT!!
bindsym Escape mode "default"
}
# this serves as the exhaustive collection of things one can do with workspaces
mode "workspace" {
bindsym Left workspace prev_on_output
bindsym Right workspace next_on_ouput
bindsym Down workspace prev
bindsym Up workspace next
bindsym Tab layout toggle all
bindsym r exec i3-input -F 'rename workspace to "%s"' -P 'New name: '
bindsym ',' move workspace to output left
bindsym '.' move workspace to output right
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# hide/unhide i3status bar
# bindsym $mod+m bar mode toggle
# Make the currently focused window a scratchpad
bindsym $mod+Shift+z move scratchpad
# multi display workflow scripts
bindsym $mod+Shift+p exec $i3multipath/.env/bin/python $i3multipath/create_new_project.py
bindsym $mod+p exec $i3multipath/.env/bin/python $i3multipath/switch_to_next_project.py
bindsym $mod+Shift+Tab exec $i3multipath/.env/bin/python $i3multipath/move_workspaces_in_project_to_next_output.py
bindsym $mod+Control+Tab exec $i3multipath/.env/bin/python $i3multipath/move_current_container_to_next_workspace_in_project.py
bindsym $mod+o exec $i3multipath/.env/bin/python $i3multipath/rename_project.py
bindsym F8 exec $i3multipath/.env/bin/python $i3multipath/bring_container_to_current_workspace.py
bindsym $mod+Tab exec $i3multipath/switcher.sh
# rofi bindings
bindsym F7 exec "rofi -show-icons -modi combi -show combi -combi-modi drun,run"
bindsym F12 exec rofi -show-icons -show window
# launch categorized menu
# bindsym F10 exec --no-startup-id morc_menu
# volume
bindsym XF86AudioLowerVolume exec ~/.i3/utils/volume_decrease.sh
bindsym XF86AudioRaiseVolume exec ~/.i3/utils/volume_increase.sh
bindsym XF86AudioMute exec ~/.i3/utils/volume_mute.sh
# music
# bindsym XF86AudioPlay exec playerctl 'play-pause'
# bindsym XF86AudioNext exec playerctl next
# bindsym XF86AudioPrev exec playerctl previous
# brightness
bindsym XF86MonBrightnessDown exec $i3path/utils/brightness_decrease.sh
bindsym XF86MonBrightnessUp exec $i3path/utils/brightness_increase.sh
bindsym Shift+XF86MonBrightnessUp exec $i3path/utils/brightness_gui.sh
bindsym Shift+XF86MonBrightnessDown exec $i3path/utils/brightness_gui.sh
popup_during_fullscreen leave_fullscreen
show_marks yes
for_window [class="^.*"] border pixel 2
# Disable floating for nemo windows
for_window [class="Nemo" instance="^desktop_window$"] floating disable
# chrome extension popups
for_window [instance="^crx.*$" window_role="pop-up"] floating enable
for_window [instance="^crx.*$" window_role="pop-up"] sticky enable
# Open specific applications in floating mode
for_window [title="alsamixer"] floating enable border pixel 1
for_window [class="calamares"] floating enable border normal
for_window [class="Clipgrab"] floating enable
for_window [title="File Transfer*"] floating enable
for_window [class="Galculator"] floating enable border pixel 1
for_window [class="GParted"] floating enable border normal
for_window [title="i3_help"] floating enable sticky enable border normal
for_window [class="Lightdm-settings"] floating enable
for_window [class="Lxappearance"] floating enable sticky enable border normal
for_window [class="Manjaro-hello"] floating enable
for_window [class="Manjaro Settings Manager"] floating enable border normal
for_window [title="MuseScore: Play Panel"] floating enable
for_window [class="Nitrogen"] floating enable sticky enable border normal
for_window [class="Oblogout"] fullscreen enable
for_window [class="octopi"] floating enable
for_window [title="About Pale Moon"] floating enable
#for_window [class="Pamac-manager"] floating enable
for_window [class="Pavucontrol"] floating enable
for_window [class="qt5ct"] floating enable sticky enable border normal
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
for_window [class="Simple-scan"] floating enable border normal
for_window [class="(?i)System-config-printer.py"] floating enable border normal
for_window [class="Skype"] floating enable border normal
for_window [class="Timeset-gui"] floating enable border normal
for_window [class="(?i)virtualbox"] floating enable border normal
for_window [class="Xfburn"] floating enable
# Prepend title with program name
for_window [class=".*"] title_format "%class - %title"
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
i3bar_command i3bar -t
# status_command i3blocks -c $i3path/i3blocks.conf
status_command py3status -c $i3path/i3status.conf
tray_output primary
position top
colors {
background #222222
statusline #dddddd
separator #666666
# border backgr. text
focused_workspace #0088CC #0088CC #ffffff #292F34
active_workspace #333333 #333333 #ffffff #FDF6E3
inactive_workspace #333333 #333333 #888888 #EEE8D5
urgent_workspace #2f343a #900000 #ffffff #E5201D
}
}
# Theme colors
# class border backgr. text indic. child_border
client.focused #0088CC #0088CC #ffffff #dddddd
client.focused_inactive #333333 #333333 #888888 #292d2e
client.unfocused #333333 #333333 #888888 #292d2e
client.urgent #2f343a #900000 #ffffff #900000
client.placeholder #000000 #0c0c0c #ffffff #000000
client.background #2B2C2B
#############################
### settings for i3-gaps: ###
#############################
# Set inner/outer gaps
# gaps inner 5
# gaps outer -2
# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size.
# gaps inner|outer current|all set|plus|minus <px>
# gaps inner all set 10
# gaps outer all plus 5
# Smart gaps (gaps used if only more than one container on the workspace)
smart_gaps on
# Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders on
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
# bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
#############################
## Autostart applications ###
#############################
# create initial workspaces
exec --no-startup-id $i3multipath/.env/bin/python $i3multipath/create_new_project.py main
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nitrogen --restore ; sleep 1; compton -b
exec --no-startup-id xfce4-power-manager
exec --no-startup-id pamac-tray
exec_always --no-startup-id fix_xcursor
exec --no-startup-id nm-applet
exec --no-startup-id dropbox start
exec --no-startup-id insync start
exec --no-startup-id hsetroot -solid "#222222" # set desktop background
for_window [instance="dropdownTerminal"] floating enable
for_window [instance="dropdownTerminal"] resize set 1500 900
for_window [instance="dropdownTerminal"] border none
for_window [instance="dropdownTerminal"] move position center
for_window [instance="dropdownTerminal"] move scratchpad
exec --no-startup-id urxvt -bg rgba:0000/0000/0000/c800 --depth 32 -pe tabbed -name dropdownTerminal