-
Notifications
You must be signed in to change notification settings - Fork 2
/
config
395 lines (312 loc) · 13.8 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
#tHis file has been auto-generated by i3-config-wizard().
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
# Installing i3-radius https://en.terminalroot.com.br/how-to-install-i3-gaps-with-rounded-corners/
border_radius 15
#
# pavucontrol - manage audio devices
# autorandr - auto detect docked devices and adjust xrandr (autorandr --save [docked|mobile])
#
#
title_align center
new_window normal 0
for_window [class="^.*"] border pixel 0
# gaps vertical 0 4.17 only
gaps inner 15
gaps outer 5
smart_gaps on
smart_borders on
# INFORMATION
# arandr - monitor and display handling
# xinput - configure keyboard and mouse
# ROFI
# https://www.reddit.com/r/i4wm/comments/6vuen9/add_desktop_apps_to_dmenu/
# Startup
exec --no-startup-id autorandr --change --force
exec_always --no-startup-id xset r rate 200 45 #keyboard letter speed
exec --no-startup-id ~/.config/dunst/reload
exec --no-startup-id nitrogen --restore
exec --no-startup-id nm-applet
exec --no-startup-id nextcloud
exec --no-startup-id indicator-cpufreq
exec --no-startup-id fluxgui
exec --no-startup-id rescuetime
exec --no-startup-id ./joplin/Joplin.AppImage
exec --no-startup-id compton --config ~/.config/compton.conf
exec --no-startup-id blueman-applet
#exec --no-startup-id i3-msg 'workspace $ws1; exec google-chrome'
# Read colors from .Xresources ($variable, fallback)
set_from_resource $secondary secondary #000
# Xinput
# xinput list
# xinput list-props <device-id>
exec_always --no-startup-id xinput set-prop 'SynPS/2 Synaptics TouchPad' "libinput Tapping Enabled" 1
exec_always --no-startup-id xinput set-prop 'SynPS/2 Synaptics TouchPad' "libinput Accel Speed" 0.7
exec_always --no-startup-id xinput set-prop 'SynPS/2 Synaptics TouchPad' "libinput Natural Scrolling Enabled" 1
exec nm-applet
# VIM [hjkl] movement
set $left h
set $down j
set $up k
set $right l
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
set $mod2 Mod1
# Workspace back and forth
bindsym $mod2+Tab workspace back_and_forth
# Workspsace cycle
bindsym $mod2+$left workspace prev
bindsym $mod2+$right workspace next
bindsym $mod+Left workspace prev
bindsym $mod+Right workspace next
# Shortcut to open ranger (file manager/explorer)
bindsym $mod+x exec --no-startup-id urxvt -e "ranger"
bindsym $mod+p exec --no-startup-id urxvt -e "ranger"
# 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 8
font pango:Overpass 7
# 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 8
# before i3 v4.8, we used to recommend this one as the default:
# 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, its unicode glyph coverage is limited, the old
# x core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
# use mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
# bindsym $mod+Return exec urxvt -e 'tmux' #i3-sensible-terminal
bindsym $mod+Return exec ~/scripts/shell.sh
# Scratchpad popup gnome-terminal
#set $floating_terminal "gnome_floating_terminal"
#exec --no-startup-id gnome-terminal --class=$floating_terminal
#for_window [class=$floating_terminal] move scratchpad #, move position 1272 px 706 px
#bindsym $mod+t [class=$floating_terminal] scratchpad show, resize set 900 550
# Scratchpad popup terminator
#set $floating_terminal "terminator_floating"
#exec_always --no-startup-id terminator -T "$floating_terminal" -p "float_terminal"
#for_window [title=$floating_terminal] move scratchpad #, move position 1272 px 706 px
#bindsym $mod+t [title=$floating_terminal] scratchpad show, resize set 900 550
#
set $floating_terminal "terminator_floating"
exec_always --no-startup-id urxvt -name "$floating_terminal"
for_window [instance=$floating_terminal] move scratchpad #, move position 1272 px 706 px
bindsym $mod+t [instance=$floating_terminal] scratchpad show, resize set 800 350
# kill focused window
bindsym $mod+q kill
# ROFI (-combi-mode window)
bindsym $mod+d exec "rofi -modi combi -combi-modi drun,run,ssh -show combi -show-icons"
bindsym $mod+i exec "echo '' | rofi -dmenu -p 'Google Search' -width 30 -lines 0 | xargs -I{} xdg-open https://www.google.com/search?q={}"
# google search rofi
bindsym $mod+space exec --no-startup-id ~/scripts/zzzfoo.sh -r="-location 3 -width 50 -lines 6" -e="-mime:message/rfc822" -o xdg-open
# 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+$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
# split in horizontal orientation
bindsym $mod+b split h
# split in vertical orientation
bindsym $mod+v split v
# calendar
bindsym $mod+Ctrl+c exec zenity --calendar
# 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
# define names for default workspaces for which we configure key bindings later on.
# we use variables to avoid repeating the names in multiple places.
# Icons
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 $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
bindsym $mod+ctrl+4 move container to workspace $ws4; workspace $ws4
for_window [class="spotify"] move to workspace $ws10
for_window [class="Spotify"] move to workspace $ws10
for_window [class="Joplin"] move to workspace $ws4
for_window [class="discord"] move to workspace $ws9
for_window [class="code"] move to workspace $ws3
for_window [class="Code"] move to workspace $ws3
for_window [class="lotion"] move to workspace $ws4
for_window [class="gitkraken"] move to workspace $ws4
for_window [class="jetbrains-idea"] move to workspace $ws3
for_window [class="jetbrains-idea-ce"] move to workspace $ws3
for_window [class="Gimp-2.10"] move to workspace $ws4
for_window [class="Arandr"] floating enable
# 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 3 px or 3 ppt
bindsym $down resize grow height 3 px or 3 ppt
bindsym $up resize shrink height 3 px or 3 ppt
bindsym $right resize grow width 3 px or 3 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 3 px or 3 ppt
bindsym Down resize grow height 3 px or 3 ppt
bindsym Up resize shrink height 3 px or 3 ppt
bindsym Right resize grow width 3 px or 3 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"
# Color scheme (Gruvbox dark)
set $color_normal_white #a89984
set $color_bright_white #ebdbb2
set $color_normal_gray #222222
set $color_bright_gray #3c3836
set $color_bright_yellow #f99921
set $color_normal_black #282828
set $color_unused #ff0000
# set $color_test $secondary
set $color_test2 #bf9237
set $color_black #000000
set_from_resource $fg i3wm.color7 #f0f0f0
set_from_resource $bg i3wm.color2 #f0f0f0
#colors border background text indicator child_border
client.focused $color_test2 $color_bright_gray $color_bright_white $color_bright_white $color_test2
# client.focused_inactive $color_bright_gray $color_bright_gray $color_bright_white $color_unused $color_normal_black
# client.unfocused $color_normal_gray $color_normal_gray $color_normal_white $color_unused $color_normal_black
# client.urgent $color_bright_yellow $color_bright_yellow $color_normal_black $color_unused $color_unused
# client.placeholder $color_unused $color_normal_black $color_unused $color_unused $color_unused
# Polybar
exec_always --no-startup-id ~/.config/polybar/launch.sh
# Applications
bindsym $mod+c exec --no-startup-id google-chrome
# Fn keys
# Pulse Audio controls
set $audio_instance 0
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume $audio_instance +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume $audio_instance -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute $audio_instance toggle # mute sound
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec brightnessctl set 500+ # increase screen brightness
bindsym XF86MonBrightnessDown exec brightnessctl set 500- # increase screen brightness
# Touchpad controls
bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad
# Media player controls
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# Move containers to output
bindsym $mod+Shift+Right move container to output right
bindsym $mod+Shift+Left move container to output left
bindsym $mod+Shift+Up move container to output up
bindsym $mod+Shift+Down move container to output down
# Move workspace to output
bindsym $mod+Ctrl+Right move workspace to output right
bindsym $mod+Ctrl+Left move workspace to output left
bindsym $mod+Ctrl+Up move workspace to output up
bindsym $mod+Ctrl+Down move workspace to output down
# Printsreen
bindsym Shift+Print exec shutter -s
bindsym Print exec shutter -f
# i3-gaps mode
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"
}
# i3lock
bindsym $mod+shift+F9 exec i3lock -c 000000
# Power options
bindsym $mod+shift+F10 exec "i3lock -c 000000; systemctl suspend"
bindsym $mod+shift+F11 exec reboot
bindsym $mod+shift+F12 exec shutdown now
#Monitor Layout
bindsym $mod+shift+F1 exec "xrandr --output HDMI-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output eDP-1 --mode 1920x1080 --pos 1920x0 --rotate normal && i3-msg restart"
bindsym $mod+shift+F2 exec "xrandr --output HDMI-1 --off --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal && i3-msg restart"
# Block bluetooth
exec --no-startup-id rfkill block bluetooth