-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
378 lines (295 loc) · 13.7 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
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
set $alt Mod1
# ttt is littered throughout here, to track i3 bindsyms
# see https://github.com/purarue/ttt/ for more info
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Source Code Pro 12
# keybind to lock screen manually; automatically locks on screen close
bindsym $mod+Shift+Escape exec --no-startup-id ttt lock-screen
# run process to cache pixelated desktop for lock screen
exec --no-startup-id lock-screen -b
# use picom for display compositing
exec --no-startup-id picom -b
# redshift using gpslogger to grab recent location
exec --no-startup-id redshift-loc
# disk mounter
exec --no-startup-id udiskie -t
# autotiling
exec_always --no-startup-id autotiling
# warn battery daemon
exec --no-startup-id warn-battery BAT0
# hide mouse after 2 seconds
exec --no-startup-id unclutter --timeout 2
# keynav
exec --no-startup-id keynav
bindsym $mod+c exec --no-startup-id sleep 0.1 && xdotool click 1
bindsym $mod+v exec --no-startup-id sleep 0.2 && xdotool click --clearmodifiers 3
# set a random wallpaper
exec --no-startup-id randomize-wallpaper
# bind display key to randomize wallpaper
bindsym XF86Display exec --no-startup-id ttt randomize-wallpaper
# Disable trackpad
#exec --no-startup-id trackpad disable
# keyboard shortcut to toggle trackpad
bindsym $mod+g exec --no-startup-id ttt trackpad
# for when I plug in an external keyboard - refresh i3 to rebind keys
# could use udev events instead, but this is easier
exec_always --no-startup-id xmodmap ~/.config/X11/Xmodmap
# whenever I restart i3, fix my monitor setup
exec_always --no-startup-id ~/.config/screenlayout/auto.sh
# dunst, for Notifications
exec --no-startup-id dunst
bindsym $mod+grave exec --no-startup-id dunstctl close-all
# command to display/run i3 key bindings
bindsym $mod+Shift+Tab exec --no-startup-id ttt i3binds-prompt
# Bind brightness keys
# sudo usermod -aG video <yourusername>
# to allow my user to modify files in /sys/class/backlight
# symlinked to the /sys/devices/pcie...
# (may have to restart window manager for it to take affect)
bindsym XF86MonBrightnessUp exec --no-startup-id brightness up
bindsym XF86MonBrightnessDown exec --no-startup-id brightness down
# Bind $mod+Brightness keys to transparency toggle
# Uses picom-trans to set the transparency to 100/85% (same as active/inactive)
# This "breaks" inactive transparency for that tile, but that can be fixed by reloading i3 ($mod+Shift+R)
# Doesn't typically affect use case as transparency for an unfocused window is set permanently
# Disable Transparency for window
# Change mouse to target
bindsym $mod+XF86MonBrightnessUp exec --no-startup-id transparent disable target
bindsym $mod+XF86MonBrightnessDown exec --no-startup-id transparent enable target
# Kill/restart picom (compositor)
bindsym $mod+p exec --no-startup-id killall picom && notify "Killed picom!"
bindsym $mod+Shift+p exec --no-startup-id picom -b && notify "Restarting picom..."
# automatically click the 'save in password manager' and 'ok' buttons for the gpg dialog
bindsym $alt+p exec --no-startup-id notify "searching for gpg dialog..." && gpg_autoclick
# Use pactl to adjust volume in PulseAudio.
bindsym XF86AudioRaiseVolume exec --no-startup-id volume up
bindsym XF86AudioLowerVolume exec --no-startup-id volume down
bindsym XF86AudioMute exec --no-startup-id volume mute
bindsym XF86AudioMicMute exec --no-startup-id volume micmute
# todo list - mark as complete with rofi
# https://git.sr.ht/~proycon/todotxt-more
bindsym $mod+t exec --no-startup-id todo interactive
bindsym $mod+Shift+t exec --no-startup-id launch 'todo full'
# bookmark list - add/open with rofi
bindsym $mod+b exec --no-startup-id todo-prompt bookmark list
bindsym $mod+Shift+b exec --no-startup-id todo-prompt bookmark add
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# kill focused window
bindsym $mod+Shift+q kill
# rofi run menu
bindsym $mod+r exec --no-startup-id rofi -show run -display-run "run > "
# rofi switch window menu
bindsym $mod+Tab exec --no-startup-id rofi -show window -display-window "window > "
# take a screenshot (select rectangle with cursor)
bindsym --release Print exec --no-startup-id ttt screenshot
# take a screenshot of the entire screen
bindsym Shift+Print exec --no-startup-id ttt screenshot --full
# upload latest screenshot to my server
bindsym $mod+Print exec --no-startup-id ttt screenshot-upload
# add to my self model from https://github.com/purarue/ttally
bindsym $alt+s exec --no-startup-id self-picker
# edit clipboard in vim
bindsym $mod+Shift+c exec --no-startup-id clipedit
# reset clipboard formatting
bindsym $mod+$alt+c exec --no-startup-id clipreset
# mpv commands
# https://github.com/purarue/mpv-sockets.git
bindsym $mod+XF86AudioMute exec --no-startup-id mpv-play-pause && i3blocks-refresh-mpv
bindsym $mod+XF86AudioMicMute exec --no-startup-id mpv-next-song && i3blocks-refresh-mpv
bindsym $mod+Shift+XF86AudioMute exec --no-startup-id mpv-quit-latest && i3blocks-refresh-mpv
bindsym $mod+m exec --no-startup-id notify-send "$(mpv-song-description-py)"
bindsym $alt+m exec --no-startup-id mpv-play-pause && i3blocks-refresh-mpv
bindsym $mod+Shift+m exec --no-startup-id mpv-next-song && i3blocks-refresh-mpv
# on 'volume up', move forward in the file
bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id mpv-seek '5'
bindsym $mod+XF86AudioLowerVolume exec --no-startup-id mpv-seek '-5'
bindsym $mod+Shift+s exec --no-startup-id reminder-sink-notify
# highlight focused window
for_window [class=".*"] border pixel 1
# class border backgr. text indicator child_border
client.focused #4c7899 #285577 #ffffff #2e9ef4 #1100ff
client.focused_inactive #333333 #5f676a #ffffff #484e50 #00000000
client.unfocused #333333 #222222 #888888 #292d2e #00000000
client.urgent #2f343a #900000 #ffffff #900000 #00000000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# gaps config
smart_borders on
smart_gaps on
smart_borders no_gaps
gaps inner 5
gaps outer 0
# change focus
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
# resize windows - keys above "vim arrow" keys
bindsym $mod+Shift+y exec --no-startup-id i3-resize left
bindsym $mod+Shift+u exec --no-startup-id i3-resize down
bindsym $mod+Shift+i exec --no-startup-id i3-resize up
bindsym $mod+Shift+o exec --no-startup-id i3-resize right
# split in horizontal orientation
bindsym $mod+Shift+z split h
# split in vertical orientation
bindsym $mod+Shift+v split v
# switch split default orientation
# bindsym $mod+s split toggle
# enter full screen mode for the focused container
bindsym $mod+f fullscreen toggle
# toggle between tabbed and tiling
#bindsym $mod+s layout tabbed
#bindsym $mod+Shift+s layout splitv
# swap the current layout for this window to horizontal/vertical
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+space floating toggle
# toggle picture in picture
bindsym $mod+Shift+space exec --no-startup-id i3-picture-in-picture
# change focus between tiling / floating windows
# bindsym $mod+space focus mode_toggle
# toggle a window to be sticky and float
# bindsym $mod+s exec --no-startup-id i3-sticky
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+z focus child
# 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"
workspace_auto_back_and_forth yes
#bindsym $mod+b workspace back_and_forth
#bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# use xprop to find class names
# if a mpv window with --x11-name=mpv_stream_media is launched,
# resize it into the bottom right of the screen
# (picture-in-picture style).
# see my stream-media script: https://purarue.xyz/d/stream-media
# binding for this below (stream-corner)
# when a new window is launched, its focused automatically, so we
# dont have to do xdotool trickery
for_window [instance="mpv_stream_media"] exec --no-startup-id i3-picture-in-picture
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
position top
status_command i3blocks
tray_output primary
}
# send all signals listed in the i3blocks config file to i3blocks
# causing re-renders to all the blocks
bindsym $mod+$alt+r exec --no-startup-id i3blocks-refresh-all
# launcher binding
bindsym $mod+d mode "launcher"
bindsym $mod+Shift+d exec --no-startup-id notify-send -t 15000 "$(i3-launcher)"; mode "launcher"
mode "launcher" {
bindsym a exec --no-startup-id ttt wezterm; mode "default"
bindsym f exec --no-startup-id ttt firefox-developer-edition; mode "default"
bindsym g exec --no-startup-id feed-open; mode "default"
bindsym t exec --no-startup-id trakt-progress; mode "default"
bindsym y exec --no-startup-id mal-recent; mode "default"
bindsym d exec --no-startup-id ttt discord; mode "default"
bindsym k exec --no-startup-id ttt keepassxc; mode "default"
bindsym b exec --no-startup-id bookmark-open; mode "default"
bindsym l exec --no-startup-id largechar-clipboard; mode "default"
bindsym x exec --no-startup-id exo-web; mode "default"
bindsym Shift+x exec --no-startup-id exo-web-personal; mode "default"
bindsym n exec --no-startup-id ttt launch newsboat-force; mode "default"
bindsym m exec --no-startup-id ttt launch neomuttr; mode "default"
bindsym Shift+m exec --no-startup-id launch sync-neomutt; mode "default"
bindsym h exec --no-startup-id ttt launch htop; mode "default"
bindsym v exec --no-startup-id ttt launch keyvol; mode "default"
bindsym u exec --no-startup-id urlview; mode "default"
bindsym p exec --no-startup-id launch plainplay; mode "default"
bindsym Shift+s exec --no-startup-id launch splayall; mode "default"
bindsym s exec --no-startup-id stream-corner; mode "default"
bindsym $mod+f exec --no-startup-id ttt launch full_todotxt; mode "default"
bindsym 4 exec --no-startup-id stream-corner-480; mode "default"
bindsym 7 exec --no-startup-id stream-corner-720; mode "default"
bindsym 0 exec --no-startup-id stream-corner-1080; mode "default"
bindsym Shift+f exec --no-startup-id flatpak-run; mode "default"
bindsym c exec --no-startup-id ttt clrs; mode "default"
bindsym Shift+n exec --no-startup-id launch sn; mode "default"
bindsym $mod+c exec --no-startup-id SKIP_RECENT=1 launch cz; mode "default"
bindsym Shift+c exec --no-startup-id SKIP_RECENT=1 launch czd; mode "default"
bindsym $alt+c exec --no-startup-id SKIP_RECENT=1 launch czl; mode "default"
bindsym Escape mode "default"
bindsym Return mode "default"
}
# server clipboard mode
bindsym $mod+s mode "server_clipboard"
mode "server_clipboard" {
bindsym c exec --no-startup-id with-secrets server_clipboard_notify copy; mode "default"
bindsym v exec --no-startup-id with-secrets server_clipboard_notify paste; mode "default"
bindsym p exec --no-startup-id with-secrets server_clipboard_notify paste; mode "default"
bindsym Escape mode "default"
bindsym Return mode "default"
}
# keyboard shortcut to check if I have a remote internet connection
bindsym $mod+Shift+w exec --no-startup-id wfi
# open terminal
bindsym $mod+Return exec --no-startup-id ttt wezterm
# open a browser tab
bindsym $mod+Shift+Return exec --no-startup-id ttt firefox-developer-edition --new-tab;
# move chromedriver (webscraping) instances to 9
assign [class="Chromium-browser"] 9
assign [class="Chromium"] 9
assign [class="Google-chrome"] 9
# IM/Chat to 5
for_window [class="Slack"] move to workspace 5
for_window [class="Microsoft Teams - Preview"] move to workspace 5
# start nm-applet
exec --no-startup-id nm-applet
# background processes unrelated to i3/window manager
# start supervisor background processes
exec --no-startup-id super --daemon
# https://purarue.xyz/d/cstimer-server?dark
exec --no-startup-id cstimer-server
exec --no-startup-id ~/Repos/exobrain/scripts/exobrain-launch-in-editor
# Run cstimer on my machine locally
# https://purarue.xyz/d/cstimer?dark
exec --no-startup-id cstimer
# enable tap to click
exec_always --no-startup-id trackpad-tap-to-click enable
# vim:ft=i3config