/
config
executable file
·410 lines (342 loc) · 16.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
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
#!/bin/bash
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
set $mod2 Mod1
set $dark #2d2d2d
set $grey #333333
set $red #EF2929
set $green #8ae234
set $dblue #3465a4
set $blue #729fcf
set $lblue #34e2d4
set $lgrey #dedede
set $white #f9f9f9
# enable gnome settings early to prevent theme bugs with starting apps
exec --no-startup-id /usr/lib/gnome-settings-daemon/gnome-settings-daemon
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. ISO 10646 = Unicode
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, if you need a lot of unicode glyphs or
# right-to-left text rendering, you should instead use pango for rendering and
# chose a FreeType font, such as:
#font pango:DejaVu Sans Mono 9
#font pango: Cantarell Bold 10
#font pango: Share Tech Bold 10
font pango: Terminus, Icons 9
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec --no-startup-id i3-sensible-terminal
# start a filemanager
bindsym $mod+Shift+Return exec --no-startup-id nautilus
# kill focused window
bindsym $mod+Shift+q kill
bindsym mod1+F4 kill
# start dmenu (a program launcher)
#bindsym $mod+d exec --no-startup-id dmenu_run -fn 'Share Tech Bold' -nb '#333333' -nf
#bindsym $mod+d exec --no-startup-id dmenu_run -fn 'Share Tech Bold-10' -nb '$grey' -nf '$lgrey' -sb '$lgrey' -sf '$red'
bindsym $mod+d exec --no-startup-id dmenu_run -fn 'Terminus-10' -nb '$grey' -nf '$lgrey' -sb '$lgrey' -sf '$red'
# 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 (vim based)
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l 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+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l 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+g split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# 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
# Workspace names
set $ws1 1: term
set $ws2 2: www
set $ws3 3: three
set $ws4 4: four
set $ws5 5: five
set $ws6 6: six
set $ws7 7: seven
set $ws8 8: eight
set $ws9 9: dp
set $ws10 10: com
# browser workspace preferes external monitor
workspace "2: www" output DP1
workspace "7: seven" output DP1
workspace "10: com" output LVDS1
workspace "1: term" output LVDS1
# rename workspace
bindsym $mod+F2 exec --no-startup-id i3-input -F 'rename workspace to %s' -P 'New name: '
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
# workspace management
# workspace $ws1 output LVDS1
# workspace 9 automatically displays on an external monitor connected to the display port (for presentation purposes)
#workspace MONITOR output DP1
# Move the current workspace to the next output
# (effectively toggles when you only have two outputs)
bindsym $mod+o move workspace to output right
# Put this window on the presentation output.
bindsym $mod+p move container to output DP1
# 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 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 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
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
colors {
background $grey
statusline $lgrey
separator $grey
#separator $lgrey
# border background text
focused_workspace $grey $lgrey $red
active_workspace $grey $grey $lgrey
inactive_workspace $grey $grey $lgrey
urgent_workspace $grey $red $lgrey
}
}
# next/previous workspace
bindsym $mod2+Tab focus right
bindsym $mod2+Shift+Tab focus left
bindsym $mod+Tab workspace back_and_forth
bindsym $mod+Next workspace next
bindsym $mod+Prior workspace prev
# Assign some applications to certain workspaces
# use xprop to figure out the class variable
#assign [class="Gnome-terminal"] $ws1
assign [class="Google-chrome-stable"] $ws2
assign [class="Firefox"] $ws2
#assign [class="Evince"] $ws3
assign [class="Pidgin"] $ws10
assign [class="Ts3client_linux_amd64"] $ws10
assign [class="Sublime_text"] $ws3
assign [class="jetbrains-android-studio"] $ws3
#Google Hangout
#assign [class="crx_nckgahadagoaajjgafhacjanaoiihapd"] $ws10
assign [class="Xchat"] $ws10
assign [class="Steam"] $ws7
assign [class="Skype"] $ws10
# disable borders for some applications
for_window [class="^Google-chrome-stable$"] border none
for_window [class="^Firefox$"] border none
for_window [class="Nautilus"] border none
#for_window [class="Steam"] border none
# enable floating mode for some applications
for_window [class="Nautilus" instance="file_progress"] floating enable
for_window [class="Nautilus" instance="file_progress"] border normal
for_window [class="Steam" instance="Friends"] floating enable
for_window [class="Gcalctool"] floating enable
# weird workaround for steam, see https://github.com/ValveSoftware/steam-for-linux/issues/597
for_window [class="Steam"] floating enable
for_window [class="Steam" title="^Steam$"] floating disable
for_window [class="Pavucontrol"] floating enable
# i3clock settings
#bindsym $mod+Escape exec i3lock -c 333333
#bindsym XF86ScreenSaver exec i3lock -c 333333
#bindsym XF86ScreenSaver exec --no-startup-id i3lock -i ~/img/archlinux-simplygrey-left_bottom.png
bindsym XF86ScreenSaver exec --no-startup-id i3lock -i ~/img/i3lock_black.png
# suspend
#bindsym XF86Sleep exec i3lock -i ~/img/archlinux-simplygrey-left_bottom.png && systemctl suspend
bindsym XF86Sleep exec --no-startup-id systemctl suspend
# Keybindings to start applications
bindsym $mod+c exec --no-startup-id subl
bindsym $mod+b exec --no-startup-id google-chrome-stable
# Keybindings to switch to certain applications
bindsym $mod+Shift+b [class="^Google-chrome-stable$"] focus
# set some nice colors border background text
client.focused $grey $lgrey $red $red
client.unfocused $grey $dark $lgrey $red
client.focused_inactive $grey $dark $lgrey $red
client.urgent $grey $dark $lgrey $red
#exec --no-startup-id xsetroot -solid "#333333"
#exec --no-startup-id gnome-settings-daemon
#exec --no-startup-id /usr/lib/gnome-settings-daemon/gnome-settings-daemon
exec --no-startup-id dropboxd
exec --no-startup-id nm-applet
#exec --no-startup-id google-chrome-stable
#exec --no-startup-id start-pulseaudio-x11
#exec --no-startup-id gnome-terminal
# pulse audio volume control
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -- '-5%' && killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 -- '+5%' && killall -SIGUSR1 i3status
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle && killall -SIGUSR1 i3status
#bindsym XF86AudioRaiseVolume exec amixer -c 0 set Master 1+ && killall -SIGUSR1 i3status
#bindsym XF86AudioLowerVolume exec amixer -c 0 set Master 1- && killall -SIGUSR1 i3status
bindsym XF86AudioMute exec amixer set Master toggle && killall -SIGUSR1 i3status
bindsym XF86AudioMicMute exec --no-startup-id amixer set Capture toggle && killall -SIGUSR1 i3status
bindsym XF86Launch1 exec --no-startup-id pavucontrol
bindsym $mod+F1 exec --no-startup-id pavucontrol
bindsym XF86MonBrightnessUp exec --no-startup-id /usr/bin/xbacklight -inc 10
bindsym XF86MonBrightnessDown exec --no-startup-id /usr/bin/xbacklight -dec 5
# display monitor settings
exec --no-startup-id xset dpms 600 600 600
# $mod+n reserved for close all notifications
# see ~/.config/dunst/dunstrc for more
# Screenshots based on the "Print" key. Requires the "scrot" tool.
# With $mod: Interactively select window or rectangle.
# With Shift: JPEG instead of PNG.
# With Ctrl: Sleep 5 seconds before doing the screenshot.
bindsym Print exec --no-startup-id scrot "$HOME/Pictures/Screenshot %Y-%m-%d %H-%M-%S %z.png" && notify-send "png screenshot taken"
bindsym Shift+Print exec --no-startup-id scrot "$HOME/Pictures/Screenshot %Y-%m-%d %H-%M-%S %z.jpg" && notify-send "jpg screenshot taken"
bindsym --release $mod+Print exec --no-startup-id scrot -s "$HOME/Pictures/Screenshot %Y-%m-%d %H-%M-%S %z.png" && notify-send "png screenshot of window taken"
bindsym --release $mod+Shift+Print exec --no-startup-id scrot -s "$HOME/Pictures/Screenshot %Y-%m-%d %H-%M-%S %z.jpg" && notify-send "jpg screenshot of window taken"
bindsym Control+Print exec --no-startup-id sleep 5 && scrot "$HOME/Pictures/Screenshot %Y-%m-%d %H-%M-%S %z.png" && notify-send "png screenshot in 5s"
bindsym Control+Shift+Print exec --no-startup-id sleep 5 && scrot "$HOME/Pictures/Screenshot %Y-%m-%d %H-%M-%S %z.jpg" && notify-send "jpg screenshot in 5s"
bindsym --release $mod+Control+Print exec --no-startup-id sleep 5 && scrot -s "$HOME/Pictures/Screenshot %Y-%m-%d %H-%M-%S %z.png" && notify-send "png screenshot of window in 5s"
bindsym --release $mod+Control+Shift+Print exec --no-startup-id sleep 5 && scrot -s "$HOME/Pictures/Screenshot %Y-%m-%d %H-%M-%S %z.jpg" && notify-send "jpg screenshot of window in 5s"
# Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the first scratchpad window
bindsym $mod+minus scratchpad show
# set desktop wallpaper
exec --no-startup-id sh ~/.fehbg
# shutdown, reboot, lock script
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 ~/.i3exit lock, mode "default"
bindsym f exec --no-startup-id ~/.i3exit fun, mode "default"
bindsym e exec --no-startup-id ~/.i3exit logout, mode "default"
bindsym s exec --no-startup-id ~/.i3exit suspend, 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"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
#bindsym $mod+P mode "$mode_system"
bindsym Control+Mod1+Delete mode "$mode_system"
bindsym $mod+Escape mode "$mode_system"
# start nautilus interactively
set $mode_terminal Terminal (h) Home, (d) Downloads, (c) Cloud, (e) ETH, (n) NAS
mode "$mode_terminal" {
bindsym h exec --no-startup-id gnome-terminal, mode "default"
bindsym d exec --no-startup-id gnome-terminal --working-directory=Downloads, mode "default"
bindsym c exec --no-startup-id gnome-terminal --working-directory=Dropbox, mode "default"
bindsym e exec --no-startup-id gnome-terminal --working-directory=Dropbox/ETH/4.\ Semester\ FS14, mode "default"
bindsym n exec --no-startup-id gnome-terminal --working-directory=/mnt/nas, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+backslash mode "$mode_terminal"
# start nautilus interactively
set $mode_nautilus File Browser (h) Home, (d) Downloads, (c) Cloud, (e) ETH, (n) NAS
mode "$mode_nautilus" {
bindsym h exec --no-startup-id nautilus ~/, mode "default"
bindsym d exec --no-startup-id nautilus ~/Downloads, mode "default"
bindsym c exec --no-startup-id nautilus ~/Dropbox, mode "default"
bindsym e exec --no-startup-id nautilus ~/Dropbox/ETH/4.\ Semester\ FS14, mode "default"
bindsym n exec --no-startup-id nautilus /mnt/nas, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Shift+backslash mode "$mode_nautilus"
# choose xrandr displaymode
set $mode_display Display mode (d) dual, (m) monitor, (l) laptop
mode "$mode_display" {
bindsym d exec --no-startup-id xrandr --output LVDS1 --auto --right-of DP1 --output DP1 --auto, mode "default"
bindsym m exec --no-startup-id xrandr --output LVDS1 --off --output DP1 --auto, mode "default"
bindsym l exec --no-startup-id xrandr --output LVDS1 --auto --output DP1 --off, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+I mode "$mode_display"
bindsym XF86AudioNext exec --no-startup-id /usr/bin/mpc next
bindsym XF86AudioPrev exec --no-startup-id /usr/bin/mpc prev
bindsym XF86AudioStop exec --no-startup-id /usr/bin/mpc stop
bindsym XF86AudioPlay exec --no-startup-id /usr/bin/mpc toggle
exec --no-startup-id "i3-msg 'workspace 10: com; append_layout /home/marcel/.i3/workspace-10.json'"
bindsym $mod+Home exec --no-startup-id $HOME/.dock on
bindsym $mod+End exec --no-startup-id $HOME/.dock off
# for later use
# Fn+2 → XF86ScreenSaver
# Fn+2 → XF86ScreenSaver
# Fn+4 → XF86Sleep & XF86Wakeup
# Fn+12 → XF86Suspend