-
Notifications
You must be signed in to change notification settings - Fork 1
/
i3config.base
333 lines (276 loc) · 11.4 KB
/
i3config.base
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
# vim: ft=i3
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# alt
set $mod Mod1
# winkey
set $mod2 Mod4
# dmenu -i -l 20 -fn 'WenQuanYi Zen Hei Mono:bold' -sb '#E17800' -sf '#000000' -h 23
set $fzfsel $HOME/Configuration-files/floating_fzf/bin/fzf_selector.sh
set $quickbin python3 $HOME/Projects/quickswitch-for-i3/quickswitch.py
set $quickdmenu --dmenu $HOME/Configuration-files/floating_fzf/bin/fzf_selector.sh
set $redshift ~/bin/reds
# font for window titles. ISO 10646 = Unicode
#font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# This requires a recent version of i3 with xft support.
# font pango:NanumGothic Regular 10, FreeSans 10
# font pango:DejaVu Sans Bold 11
# font pango:WenQuanYi Micro Hei Mono Bold 9.4
font pango:WenQuanYi Micro Hei Mono Bold 11
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# Use 1 pixel borders by default
new_window pixel 2
# No vertical borders on screen edges
hide_edge_borders smart
# Repeated presses of the same workspace number switches focus to previous workspace
workspace_auto_back_and_forth yes
# Do not move mouse pointer when focusing window on other monitor
mouse_warping none
# start a terminal
# set $term urxvt_color_tmux
set $term alacritty_tmux
bindsym $mod+Return exec $term
bindsym $mod+Control+Return exec $term ranger
# toggle terminal theme
bindsym $mod+F1 exec rcm --toggle
# safe terminal in case of failure
bindsym $mod2+t exec alacritty
bindsym $mod2+Control+t exec urxvt
bindsym $mod2+Shift+T exec xterm
# kill focused window
bindsym $mod+Shift+W kill
# start dmenu
bindsym $mod+d exec fzf_launcher.sh
# start dmenu for .desktop entries
bindsym $mod+Shift+D exec i3-dmenu-desktop --dmenu "$fzfsel"
# start dmenu for emoji
# bindsym $mod+Control+e mark z ; exec $HOME/bin/floating_fzf_emoji ; [con_mark="z"] focus
# bindsym $mod+Control+e mark z ; exec $HOME/bin/floating_fzf_emoji ; exec sleep 4 ; [con_mark="z"] focus
bindsym $mod+Control+e exec $HOME/bin/floating_fzf_emoji
# start apps
bindsym $mod+Control+p exec pavucontrol
# bindsym $mod+Control+g exec ~/Projects/chromium-latest-linux/run.sh
bindsym $mod+Control+g exec google-chrome
bindsym $mod+Control+f exec firefox
bindsym $mod+Control+t exec firefox --new-window 'https://translate.google.com'
bindsym $mod+Control+v exec gvim
bindsym $mod+Control+n exec $term nvim
bindsym $mod+Shift+V exec gvim -S $HOME/.cache/unite/session/life.vim
bindsym $mod+Control+y exec my
bindsym $mod+Control+i exec mi
# bindsym $mod2+n exec restart_dunst.sh
# bindsym --release $mod+Control+s exec --no-startup-id scrot -o -s $HOME/t/scrot.png
bindsym --release $mod+Control+s exec --no-startup-id screenshot
bindsym --release $mod+Control+Shift+S exec scrot -o $HOME/t/scrot.png
# lock X session
bindsym $mod2+s exec lock
# bindsym $mod2+Shift+S exec suspend
# bindsym $mod2+Shift+H exec nolock_suspend
# nvim anywhere
for_window [title = "nvimanywhere"] floating enable
bindsym --release $mod2+i exec --no-startup-id anywherenvim
# pacmixer
for_window [title = "pacmixer"] floating enable
bindsym $mod+Control+a exec alacritty --title pacmixer -e pacmixer
# move focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod2+h focus output left
bindsym $mod2+j focus output down
bindsym $mod2+k focus output up
bindsym $mod2+l focus output right
bindsym $mod2+Shift+H move container to output left
bindsym $mod2+Shift+J move container to output down
bindsym $mod2+Shift+K move container to output up
bindsym $mod2+Shift+L move container to output 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
# move current workspace between monitors
bindsym $mod+Control+h move workspace to output left
bindsym $mod+Control+j move workspace to output down
bindsym $mod+Control+k move workspace to output up
bindsym $mod+Control+l move workspace to output right
# rename current workspace
bindsym $mod+Control+r exec i3-input -F 'rename workspace to "%s"' -P 'New name: '
# split in horizontal orientation
bindsym $mod+y split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+space fullscreen
bindsym $mod+Shift+space fullscreen global
# change container layout (stacked, tabbed, default)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout default
# toggle tiling / floating
bindsym $mod+Shift+Z floating toggle
# hide/show i3 bar
bindsym $mod+a bar mode toggle
# change focus between tiling / floating windows
bindsym $mod+z focus mode_toggle
# focus the parent container
bindsym $mod+u focus parent
# focus the child container
bindsym $mod+Shift+U focus child
# vim-like marks
# bindsym $mod+m exec i3-input -F 'mark %s' -l 1 -P 'Mark: '
# bindsym $mod+n exec i3-input -F '[con_mark="%s"] focus' -l 1 -P 'Go to: '
bindsym $mod+Shift+I mark i
bindsym $mod+Shift+G mark g
bindsym $mod+Shift+Q mark q
bindsym $mod+Shift+O mark o
# bindsym $mod+Shift+P mark p
# bindsym $mod+Shift+M mark m
bindsym $mod+Shift+semicolon mark ";"
bindsym $mod+Shift+apostrophe mark "'"
bindsym $mod+Shift+comma mark ","
bindsym $mod+i [con_mark="i"] focus
bindsym $mod+g [con_mark="g"] focus
bindsym $mod+q [con_mark="q"] focus
bindsym $mod+o [con_mark="o"] focus
# bindsym $mod+p [con_mark="p"] focus
# bindsym $mod+m [con_mark="m"] focus
bindsym $mod+semicolon [con_mark=";"] focus
bindsym $mod+apostrophe [con_mark="'"] focus
bindsym $mod+comma [con_mark=","] focus
# 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
bindsym $mod+m exec $quickbin -e
bindsym $mod+Shift+M exec $quickbin -ejF
bindsym $mod+n exec $quickbin -n
bindsym $mod+p exec $quickbin -p
bindsym $mod+Shift+N exec $quickbin -nmF
bindsym $mod+Shift+P exec $quickbin -pmF
# bindsym $mod+t exec --no-startup-id tmux_open_session
bindsym $mod+t exec --no-startup-id tmux_open_session_alacritty
bindsym $mod+Tab exec $quickbin $quickdmenu
bindsym $mod2+Tab exec $quickbin --workspaces $quickdmenu
bindsym $mod2+Shift+Tab exec $quickbin --workspaces --journey -F $quickdmenu
# switch between the current and the previously focused one
bindsym $mod+BackSpace workspace back_and_forth
bindsym $mod+Shift+BackSpace move container to workspace back_and_forth
# move focused container to workspace
bindsym $mod+Shift+exclam move container to workspace number 1
bindsym $mod+Shift+at move container to workspace number 2
bindsym $mod+Shift+numbersign move container to workspace number 3
bindsym $mod+Shift+dollar move container to workspace number 4
bindsym $mod+Shift+percent move container to workspace number 5
bindsym $mod+Shift+asciicircum move container to workspace number 6
bindsym $mod+Shift+ampersand move container to workspace number 7
bindsym $mod+Shift+asterisk move container to workspace number 8
bindsym $mod+Shift+parenleft move container to workspace number 9
bindsym $mod+Shift+parenright move container to workspace number 10
# reload the configuration file
bindsym $mod+Shift+C exec refresh-configs ; reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+R exec refresh-configs ; restart
# Change system volume with media keys
# bindsym XF86AudioRaiseVolume exec amixer -q set Master 2dB+ unmute
# bindsym XF86AudioLowerVolume exec amixer -q set Master 2dB- unmute
# bindsym XF86AudioMute exec amixer -q set Master toggle
bindsym XF86AudioMute exec pactl set-sink-mute $audiosink toggle
bindsym XF86AudioLowerVolume exec pactl set-sink-volume $audiosink -- -5%
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $audiosink +5%
bindsym $mod+F10 exec pactl set-sink-mute $audiosink toggle
bindsym $mod+F11 exec pactl set-sink-volume $audiosink -- -5%
bindsym $mod+F12 exec pactl set-sink-volume $audiosink +5%
# Change brightness with media keys
bindsym XF86KbdBrightnessDown exec xbacklight -dec 5
bindsym XF86KbdBrightnessUp exec xbacklight -inc 5
bindsym $mod+F5 exec xbacklight -dec 5
bindsym $mod+F6 exec xbacklight -inc 5
bindsym $mod+F7 exec ~/.layout/laptop.sh
bindsym $mod+F8 exec ~/.layout/office.sh
bindsym $mod+F9 exec ~/.layout/sofa.sh
bindsym $mod2+x exec setx
# Scratchpad
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
# Rules for specific windows
for_window [title="^Warsow$"] fullscreen
for_window [title="^ioquake3$"] fullscreen
for_window [title = "fzffloater"] floating enable
for_window [title = "pwwd.nvim"] floating enable
# 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 h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
bindsym Shift+H resize shrink width 5 px or 5 ppt
bindsym Shift+J resize grow height 5 px or 5 ppt
bindsym Shift+K resize shrink height 5 px or 5 ppt
bindsym Shift+L resize grow width 5 px or 5 ppt
# same bindings, but for the arrow keys
bindsym 113 resize shrink width 3 px or 3 ppt
bindsym 116 resize grow height 3 px or 3 ppt
bindsym 111 resize shrink height 3 px or 3 ppt
bindsym 114 resize grow width 3 px or 3 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "F3-passthrough" {
bindsym $mod+F3 mode "default"
}
mode "F4-passthrough" {
bindsym $mod+F4 mode "default"
}
bindsym $mod+r mode "resize"
bindsym $mod+F3 mode "F3-passthrough"
bindsym $mod+F4 mode "F4-passthrough"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
colors {
background #000000
statusline #999999
separator #000000
# colorclass border backg. text
focused_workspace #E17800 #E17800 #000000
active_workspace #000000 #000000 #ffffff
inactive_workspace #000000 #000000 #999999
urgent_workspace #E17800 #332200 #ffffff
}
position top
tray_output primary
font xft:WenQuanYi Micro Hei Mono Bold 11
status_command ~/bin/i3conky.sh
}
# colors colours
# class border backgr. text indicator
client.focused #E17800 #E17800 #000000 #4ebeff
client.focused_inactive #000000 #000000 #dddddd #181e20
client.unfocused #000000 #000000 #666666 #191d1e
client.urgent #2f343a #900000 #ffffff #900000
# exec --no-startup-id $redshift
# exec killall -q notify-osd
# exec --no-startup-id dunst
# disable mouse acceleration
exec --no-startup-id xset m 0 0
# disable screen blanking TODO fix this
exec --no-startup-id xset s 0
# start kde-connect
exec --no-startup-id kdeconnect-cli --refresh
# Clear background
exec --no-startup-id xsetroot -solid "#000000"