-
Notifications
You must be signed in to change notification settings - Fork 3
/
config
executable file
·392 lines (309 loc) · 14.5 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
# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#Mod4 = super key
set $mod Mod4
set $i3path /home/lopis/dev/i3config
# custom variables for workspaces
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
font pango:SystemFont 12px
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Shift+Return exec xterm
# kill focused window
bindsym $mod+Shift+q kill
bindsym Ctrl+q exec ~/noctrlq.sh
# change focus
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
# switch to workspace
bindsym $mod+Ctrl+Left workspace prev
bindsym $mod+Ctrl+Right workspace next
# split in horizontal orientationg
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+z focus child
bindsym $mod+greater move workspace to output up
bindsym $mod+less move workspace to output down
# switch to workspace
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 10
# move focused container to workspace
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 10
# move workspace to another screen
bindsym $mod+m move workspace to output left
bindsym $mod+Shift+m move workspace to output left
# 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
# Shows a prompt to exit or power down the computer
set $Locker i3lock && sleep 1
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"
}
bindsym $mod+ctrl+p mode "$mode_system"
#bindsym $mod+ctrl+p exec systemctl poweroff; mode "default"
# 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 ccedilla 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"
#i3lock
bindsym $mod+ctrl+l exec --no-startup-id i3lock -c 000000
#screenshots
bindsym --release $mod+ctrl+Print exec "scrot /tmp/scrot_screenshot.png; xclip -selection clipboard -t image/png -i /tmp/scrot_screenshot.png; rm /tmp/scrot_screenshot.png -f"
bindsym --release $mod+Print exec "flameshot gui"
bindsym --release Print exec "scrot -f -s /tmp/scrot_screenshot.png; xclip -selection clipboard -t image/png -i /tmp/scrot_screenshot.png; rm /tmp/scrot_screenshot.png -f"
# Colors
# primary
set $color1 #1F1D36
# secondary
set $color2 #3F3351
# highlight
set $color3 #864879
# text
set $color4 #E9A6A6
# start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id dmenu_run -fn "Ubuntu" -nb "$color2" -nf "$color4" -sb "$color3" -h 35
# 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
# Emoji🤣
bindsym $mod+shift+e exec --no-startup-id ./dev/i3config/dmoji
# class border backgr. text indicator child_border
client.focused $color1 $color1 $color4 $color4 $color1
client.focused_inactive $color1 $color1 $color4 #484e50 #bdbdbd
client.unfocused $color2 $color2 $color3 #292d2e #bdbdbd
client.urgent $color3 $color3 $color4 #900000 #900000
client.placeholder #000000 #0c0c0c $color4 #000000 #0c0c0c
# client.focused #00000000 #00000000 $color1 $color4 $color1
# client.focused_inactive #00000000 #00000000 $color2 #484e50 #bdbdbd
# client.unfocused #00000000 #00000000 $color3 #292d2e #bdbdbd
# client.urgent #00000000 #00000000 $color1 #900000 #900000
# client.placeholder #00000000 #00000000 $color1 #000000 #0c0c0c
client.background $color2
# Start i3bar to display a workspace bar (plus the system information i3status finds out, if available)
bar {
height 35
font pango:SystemFont, FontAwesome 14px
#i3bar_command i3bar
colors {
background $color1
statusline $color
separator $color1
# Type border backg. font
focused_workspace $color1 $color2 $color
active_workspace $color1 $color1 $color
inactive_workspace $color1 $color1 $color
urgent_workspace #650505 #650505 $color
}
tray_padding 6
position top
status_command i3blocks -c $i3path/i3blocks.conf
#status_command i3status -c $i3path/i3status.conf
}
hide_edge_borders both
#Place the external monitor on top
#To get screen names: xrandr --listactivemonitors
#xrandr --output DP1 --auto --pos 0x0 --output eDP1 --auto --pos 320x1440
# launch Calculator
bindsym $mod+c exec "galculator"
# launch Translator
# needs escaping the # in the color values...
bindsym $mod+t exec dmenu-translate -fn "Ubuntu" -nb "\$color2" -nf "\$color4" -sb "\$color3" -h 35
# Fullscreen window to floating
bindsym $mod+y fullscreen disable; floating enable; resize set 400 300; sticky enable; move window to position 1515 20
#for i in {1..15}; do amixer -D pulse sset Master 1%+; done
# Volume control
bindsym XF86AudioRaiseVolume exec --no-startup-id "$i3path/volume-ctrl.sh 10 1%+"
bindsym XF86AudioLowerVolume exec --no-startup-id "$i3path/volume-ctrl.sh 10 1%-"
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse sset Master toggle
# Balance control
bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id "amixer -D pulse sset Master 5%-,5%+ unmute"
bindsym Shift+XF86AudioLowerVolume exec --no-startup-id "amixer -D pulse sset Master 5%+,5%- unmute"
bindsym Shift+XF86AudioMute exec --no-startup-id "amixer -D pulse sset Master 0%"
# Touchpad controls
bindsym XF86TouchpadToggle exec --no-startup-id /some/path/toggletouchpad.sh # toggle touchpad
# Media player controls
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioPause exec --no-startup-id playerctl pause
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
# Mouse Buttons
bindsym $mod+button8 exec --no-startup-id playerctl next
set $spotifyCmd dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2
bindsym $mod+XF86AudioMute exec --no-startup-id "$spotifyCmd org.mpris.MediaPlayer2.Player.PlayPause"
bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id "$spotifyCmd org.mpris.MediaPlayer2.Player.Next"
bindsym $mod+XF86AudioLowerVolume exec --no-startup-id "$spotifyCmd org.mpris.MediaPlayer2.Player.Previous"
# Screen brightness controls
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 20 # increase screen brightness
bindsym XF86MonBrightnessDown exec --no-startup-id light -U 20 # decrease screen brightness
bindsym Ctrl+XF86MonBrightnessUp exec --no-startup-id light -A 2 # increase screen brightness
bindsym Ctrl+XF86MonBrightnessDown exec --no-startup-id light -U 2 # decrease screen brightness
# External monitor brightness controls
bindsym Shift+XF86MonBrightnessUp exec --no-startup-id xrandr --output DP-1 --brightness 1
bindsym Shift+XF86MonBrightnessDown exec --no-startup-id xrandr --output DP-1 --brightness 1
#Enable natural scrolling
exec --no-startup-id synclient HorizEdgeScroll=0 VertEdgeScroll=0 HorizTwoFingerScroll=1 VertTwoFingerScroll=1 VertScrollDelta=-90 HorizScrollDelta=-90
exec --no-startup-id "/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh; export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID GPG_AGENT_INFO SSH_AUTH_SOCK"
# Open file manager
bindsym $mod+e exec --no-startup-id nautilus
# Connect to VPN
bindsym $mod+Ctrl+V exec 'sudo ipsec up NordVPN'
bindsym $mod+Ctrl+Shift+V exec 'sudo ipsec down NordVPN'
# x-kill kills a window
bindsym $mod+Ctrl+X --release exec --no-startup-id xkill
# Shows a prompt to choose monitor mode
set $mode_monitors Monitor Mode (e) external, (i) internal, (a) all, (m) mirror, (c) cycle
mode "$mode_monitors" {
bindsym e exec --no-startup-id $i3path/monitors.sh external || notify-send "monitors.sh not found", mode "default"
bindsym i exec --no-startup-id $i3path/monitors.sh internal || notify-send "monitors.sh not found", mode "default"
bindsym a exec --no-startup-id $i3path/monitors.sh all || notify-send "monitors.sh not found", mode "default"
bindsym m exec --no-startup-id $i3path/monitors.sh mirror || notify-send "monitors.sh not found", mode "default"
bindsym c exec --no-startup-id $i3path/monitors.sh || notify-send "monitors.sh not found", mode "default"
# back to normal: Entelight -A -b 20r or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+ctrl+s mode "$mode_monitors"
# Shows a prompt to choose audio output
set $mode_audio Audio Output (a) toggle HDMI, (b) toggle bluetooth
mode "$mode_audio" {
bindsym a exec --no-startup-id $i3path/audio.sh external || notify-send "audio.sh not found", mode "default"
bindsym b exec --no-startup-id notify-send "Not implemented", mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+ctrl+a mode "$mode_audio"
# Reset counter
bindsym $mod+Ctrl+0 exec "pkill pomodoro.sh; rm -rf /tmp/termdown.tmp; $i3path/pomodoro.sh"
## Workspace specific settings
# Assign Workspaces:
#####################
### i3-gaps stuff ###
# Necessary for i3-gaps to work properly (pixel can be any value)
for_window [class="^.*"] border pixel 0
#for_window [class="Firefox"] move to workspace $ws1
for_window [class="Firefox" window_role="Organizer"] floating enable resize set 900 650
for_window [class="Pavucontrol"] floating enable
for_window [class="Blueman-manager"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="pop-up"] border pixel 1
for_window [window_role="About"] floating enable
for_window [window_role="About"] border pixel 1
for_window [window_role="task_dialog"] floating enable
for_window [window_role="task_dialog"] border pixel 1
for_window [window_role="Preferences"] floating enable
for_window [window_role="Preferences"] border pixel 1
for_window [window_role="GtkFileChooserDialog"] floating enable
for_window [window_role="GtkFileChooserDialog"] border pixel 1
for_window [class="Yad"] floating enable #calendar
for_window [class="gdebi*"] floating enable resize set 900 650
for_window [title="Package Installer"] floating enable resize set 900 650
for_window [class="File-roller"] floating enable resize set 900 650
for_window [class="Galculator"] floating enable
for_window [class="Gnome-terminal"] floating enable
# Smart Gaps
# smart_gaps on
# Smart Borders
# smart_borders on
# border_radius 5
# Set inner/outer gaps
gaps inner 4
gaps outer 0
#####################
####### LAUNCH ######
# Startup Network Manager applet
exec --no-startup-id nm-applet
# Startup apps
# exec --no-startup-id telegram
# exec --no-startup-id blueman-applet
# Set wallpaper
# exec --no-startup-id "feh --bg-scale ~/Pictures/Wallpapers/*"
# Switch to workspace 1 at startup
exec --no-startup-id i3-msg workspace $ws1
exec_always --no-startup-id picom
# Sets a background color
#exec_always --no-startup-id "hsetroot -add '#9a2e7e' -add '#031d50' -gradient 0"
#exec_always --no-startup-id "hsetroot -add '#0A4CA3' -add '#210064' -gradient -15"
#exec_always --no-startup-id "hsetroot -add '#8b51f7' -add '#4f05da' -gradient -15"
#exec_always --no-startup-id "hsetroot -add '#864879' -add '#6d255e' -gradient -15"
exec_always --no-startup-id "hsetroot -add '#EF7C95' -add '#FF0062' -gradient -15"
# bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks
# bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks
# Camera controls
bindsym $mod+XF86MonBrightnessUp exec --no-startup-id "/bin/zsh $i3path/webcam.sh 10"
bindsym $mod+XF86MonBrightnessDown exec --no-startup-id "/bin/zsh $i3path/webcam.sh -10"