-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig
389 lines (286 loc) · 12.6 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
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 9
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 9
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# 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
# 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
exec --no-startup-id blueman-applet
#Settings
set $netrefresh --no-startup-id sudo -A systemctl restart NetworkManager
set $hibernate sudo -A systemctl suspend
set $mod Mod4
set $shutdown sudo -A shutdown -h now
set $reboot sudo -A reboot
set $stoprec --no-startup-id dmenurecord kill
for_window [class=".*"] border pixel 1
#gaps inner 5
#gaps horizontal 15
#gaps vertical 24
#smart_gaps on
for_window [window_role="pop-up"] floating enable
#Startup executions
exec --no-startup-id xrandr --output eDP-1-1 --mode 1920x1080 --pos 0x0 --output HDMI-1-2 --mode 1920x1080 --primary --pos 1920x0
exec --no-startup-id feh --bg-scale --no-xinerama ~/.config/i3/wallpaper.jpeg
#Applications
#Compton
exec --no-startup-id compton
bindsym Shift+BackSpace exec ulauncher [class="Ulauncher"] focus
for_window [class="Ulauncher"] floating enable, border pixel 0, focus
#mouse focus
focus_follows_mouse no
bindsym $mod+F5 exec --no-startup-id $netrefresh
bindsym Print exec gnome-screenshot -w
bindsym Shift+Print exec gnome-screenshot --interactive
bindsym XF86PowerOff exec --no-startup-id prompt "Shutdown computer?" "$poweroff"
bindsym XF86AudioPlay exec playerctl -p spotify play-pause
bindsym XF86AudioNext exec playerctl -p spotify next
bindsym XF86AudioPrev exec playerctl -p spotify previous
bindsym Mod1+q exec --no-startup-id nautilus ~/00-IB/
bindsym Control+F6 exec playerctl -p spotify previous
bindsym Control+F7 exec playerctl -p spotify next
bindsym Control+F8 exec playerctl -p spotify play-pause
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindcode 73 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
bindcode 72 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
bindcode 74 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
# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
set $up k
set $down j
set $left o
set $right semicolon
# 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
bindsym $mod+Print exec --no-startup-id "gnome-screenshot -a"
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+Tab focus up
bindsym $mod+$right 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+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right 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 orientation
#bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v 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+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
# move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindcode $mod+82 scratchpad show
#bindsym $mod+minus scratchpad show
exec ; move scratchpad
exec gapplication launch org.gnome.Shell.Extensions.GSConnect
bindsym $mod+Shift+x exec prompt "Shutdown???" "poweroff"
bindcode Shift+90 [con_mark="music"] scratchpad show
for_window [class="Spotify"] mark "music", move scratchpad, move position 300px 150px, resize set 1300 800
exec_always spotify
bindcode Shift+87 [con_mark="keep"] scratchpad show
for_window [class="Keep"] mark "keep", move scratchpad
exec gnome-terminal -x bash -c "sh ~/repos/keep/exec.sh"
bindcode Shift+88 [con_mark="snote"] scratchpad show
for_window [class="Simplenote"] mark "snote", move scratchpad
exec simplenote
bindcode Shift+89 [con_mark="p3x"] scratchpad show
for_window [class="p3x-onenote"] mark "p3x", move scratchpad
exec_always p3x-onenote
bindcode Shift+84 [con_mark="todo"] scratchpad show
for_window [class="Todoist"] mark "todo", move scratchpad
exec_always todoist
bindcode Shift+83 [con_mark="time"] scratchpad show
for_window [class="MineTime"] mark "time", move scratchpad
exec_always minetime
bindcode Shift+82 scratchpad show
bindcode Shift+104 [con_mark="code"] scratchpad show
for_window [title="termus"] mark "code", move scratchpad
exec --no-startup-id gnome-terminal -t termus
bindcode $mod+Shift+104 exec --no-startup-id gnome-terminal -t termus
bindsym $mod+Shift+z exec xkill
# 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"
# 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
#Switch to workspace
bindcode $mod+87 workspace number $ws1;workspace $ws1
bindcode $mod+88 workspace number $ws2;workspace $ws2
bindcode $mod+89 workspace number $ws3;workspace $ws3
bindcode $mod+83 workspace number $ws4;workspace $ws4
bindcode $mod+84 workspace number $ws5;workspace $ws5
bindcode $mod+85 workspace number $ws6;workspace $ws6
bindcode $mod+79 workspace number $ws7;workspace $ws7
bindcode $mod+80 workspace number $ws8;workspace $ws8
bindcode $mod+81 workspace number $ws9;workspace $ws9
bindcode $mod+90 workspace number $ws10; workspace $ws10
bindcode $mod+Shift+87 move container to workspace number $ws1;workspace $ws1
bindcode $mod+Shift+88 move container to workspace number $ws2;workspace $ws2
bindcode $mod+Shift+89 move container to workspace number $ws3;workspace $ws3
bindcode $mod+Shift+83 move container to workspace number $ws4;workspace $ws4
bindcode $mod+Shift+84 move container to workspace number $ws5;workspace $ws5
bindcode $mod+Shift+85 move container to workspace number $ws6;workspace $ws6
bindcode $mod+Shift+79 move container to workspace number $ws7;workspace $ws7
bindcode $mod+Shift+80 move container to workspace number $ws8;workspace $ws8
bindcode $mod+Shift+81 move container to workspace number $ws9;workspace $ws9
bindcode $mod+Shift+90 move container to workspace number $ws10; workspace $ws10
bindsym $mod+Control+Left move workspace to output left
bindsym $mod+Control+Right move workspace to output right
# 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
#Pavucontrol
bindsym $mod+Insert exec pavucontrol
# 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'"
# 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 $left resize shrink width 10 px or 10 ppt
bindsym $down resize grow height 10 px or 10 ppt
bindsym $up resize shrink height 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# 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"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
#font pango:mono 10
#status_command i3blocks
#position top
#mode dock
#modifier None
#}
#######################################################################
# automatically start i3-config-wizard to offer the user to create a
# keysym-based config which used their favorite modifier (alt or windows)
#
# i3-config-wizard will not launch if there already is a config file
# in ~/.config/i3/config (or $XDG_CONFIG_HOME/i3/config if set) or
# ~/.i3/config.
#
# Please remove the following exec line:
#######################################################################
exec_always --no-startup-id $HOME/.local/bin/launch_polybar
bindsym $mod+Shift+s exec ~/i3-extras/scripts/swap_ws.sh
bindsym $mod+l exec i3lock-fancy &
exec --no-startup-id ~/i3-extras/scripts/lock.sh &
exec xset dpms 0 0 0
#layout
workspace 1 output eDP-1-1
workspace 4 output eDP-1-1
workspace 10 output eDP-1-1
workspace 2 output HDMI-1-2
workspace 5 output HDMI-1-2
#Window Settings
for_window [class="^.*"] border pixel 1
assign [class=Firefox|Transmission-gtk] 2
assign [class=Geany|Evince|Gucharmap|Soffice|libreoffice*] 4
assign [class=zoom] 10
assign [class=Code] 5
for_window [class=Viewnior|feh|Audacious|File-roller|Lxappearance|Lxtask|Pavucontrol] floating enable
for_window [class=Soffice|libreoffice*|mpv|Ghb|Xfburn|Gimp*|Inkscape|Vlc|Lxappearance|Audacity] focus
#exec bash ~/i3-extras/scripts/load_prod.sh
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