This repository has been archived by the owner on Aug 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
config
539 lines (421 loc) · 19.6 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
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
# 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 some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
########################################################################
# General i3 config
########################################################################
# Win key
set $mod Mod4
# Alt
set $alt Mod1
########################################################################
# Workspaces
########################################################################
# 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; workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2; workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3; workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4; workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5; workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6; workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7; workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8; workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9; workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10; workspace number 10
# move next previous workspace
bindsym $mod+Ctrl+Right workspace next
bindsym $mod+Ctrl+Left workspace prev
bindsym $mod+Tab workspace back_and_forth
workspace_auto_back_and_forth yes
########################################################################
# i3 control
########################################################################
# 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'"
########################################################################
# Modes
########################################################################
### resize ###
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 or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
### Mode OBS set 1932 x 1080 ###
mode "obs" {
bindsym Left resize set 1932 1080
bindsym Right resize set 1932 1080
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+o mode "obs"
### Shutdown mode ###
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 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+End mode "$mode_system"
########################################################################
# Special Keybindings - Use xmodmap -pke to list keys
########################################################################
### bindings for ThinkPad keyboard ###
# Display
bindsym XF86Display exec arandr
### Audio ###
bindsym XF86AudioLowerVolume exec /usr/bin/pactl set-sink-volume 0 -20%; exec /usr/bin/aplay ~/.i3/sound/volume_blip; exec /usr/bin/killall -USR1 py3status
bindsym XF86AudioRaiseVolume exec /usr/bin/pactl set-sink-volume 0 +20%; exec /usr/bin/aplay ~/.i3/sound/volume_blip; exec /usr/bin/killall -USR1 py3status
# If you want it to toggle mute
bindsym XF86AudioMute exec /usr/bin/pactl set-sink-mute 0 toggle; exec /usr/bin/aplay ~/.i3/sound/volume_blip; exec /usr/bin/killall -USR1 py3status
# if you want it to set to zero
#bindsym XF86AudioMute exec /usr/bin/pactl set-sink-volume 0 0; exec /usr/bin/aplay ~/.i3/sound/volume_blip; exec /usr/bin/killall -USR1 py3status
# For microfone volume
#bindsym $mod+XF86AudioLowerVolume exec /usr/bin/pactl set-sink-volume 1 -20%; exec /usr/bin/aplay ~/.i3/sound/volume_blip; exec /usr/bin/killall -USR1 py3status
#bindsym $mod+XF86AudioRaiseVolume exec /usr/bin/pactl set-sink-volume 1 +20%; exec /usr/bin/aplay ~/.i3/sound/volume_blip; exec /usr/bin/killall -USR1 py3status
# for Microfone mute
#bindsym XF86AudioMicMute exec /usr/bin/pactl set-sink-mute 1 toggle; exec /usr/bin/aplay ~/.i3/sound/volume_blip; exec /usr/bin/killall -USR1 py3status
# Media player controls
#bindsym XF86AudioPlay exec playerctl play
#bindsym XF86AudioPause exec playerctl pause
#bindsym XF86AudioNext exec playerctl next
#bindsym XF86AudioPrev exec playerctl previous
### brightness ###
bindsym XF86MonBrightnessUp exec /usr/bin/xbacklight -inc 10; exec /usr/bin/killall -USR1 py3status
bindsym XF86MonBrightnessDown exec /usr/bin/xbacklight -dec 5; exec /usr/bin/killall -USR1 py3status
# reference: https://github.com/lzap/doti3/blob/master/config
### Extra buttons ###
#bindsym XF86Launch1 exec /usr/bin/aplay ~/.i3/sound/that_was_easy
#XF86Bluetooth
#XF86MenuKB
#SunFront
########################################################################
# Mouse settings
########################################################################
# disable mouse focus
focus_follows_mouse no
# The middle button over a titlebar kills the window
bindsym --release button2 kill
# The right button toggles floating
bindsym button3 floating toggle
# The mod+right button toggles sticky
bindsym $mod+button3 sticky toggle
########################################################################
# Window bindings and settings
########################################################################
# decide how to open popups in f mode
popup_during_fullscreen smart
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# (Disabling `jkl;` as I am not a VIM user)
# Change focus
#bindsym $mod+j focus left
#bindsym $mod+k focus down
#bindsym $mod+l focus up
#bindsym $mod+semicolon focus right
# 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+j move left
#bindsym $mod+Shift+k move down
#bindsym $mod+Shift+l move up
#bindsym $mod+Shift+semicolon move right
# 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
bindsym button9 move left
bindsym button8 move right
# split in horizontal orientation
bindsym $mod+h split h;exec notify-send 'split horizontally'
# split in vertical orientation
bindsym $mod+v split v;exec notify-send 'split vertically'
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking;exec notify-send 'layout stack'
bindsym $mod+w layout tabbed;exec notify-send 'layout tabbed'
bindsym $mod+e layout toggle split;exec notify-send 'layout split'
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle;exec notify-send 'floating toggle'
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
#bindsym $mod+a focus parent
bindsym $mod+a focus parent;exec notify-send 'focus parent'
bindsym $mod+Shift+a focus child;exec notify-send 'focus child'
# scratchpad
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+Shift+plus scratchpad show
# kill focused window
bindsym $mod+Shift+q kill
bindsym $mod+k kill
# border changing
bindsym $mod+b border toggle
# Toggle sticky state of a window (a floating window that appears in all workspaces)
bindsym $mod+Shift+s sticky toggle
# Rename workspace with i3-input using numbers and text
bindsym $mod+Shift+n exec i3-input -F 'rename workspace to "%s"' -P 'New name: '
# Lock on Ctrl+Alt+l
bindsym Control+Mod1+l exec i3-msg workspace guest && i3lock -c 111111 -d
# lock automatically after 10 minutes (needs xautolock)
#exec --no-startup-id xautolock -locker "i3lock -i /path/to/image.png" -time 10
# put YouTube into fullscreen and execute this for media mode
#bindsym $mod+y fullscreen disable; floating enable; resize set 600 400; sticky enable; move window to position 1940 54
########################################################################
# Launchers bindings
########################################################################
# start a terminal
#bindsym $mod+Return exec xfce4-terminal
bindsym $mod+Return exec tilix
# start dmenu (a program launcher)
bindsym $alt+F2 exec --no-startup-id dmenu_run
bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
bindsym $alt+Tab exec --no-startup-id "rofi -combi-modi window,drun -show combi -modi combi"
# kupfer is someway already opening with Ctrl+space (k stands better for kill)
#bindsym $mod+k exec kupfer
# Print Screen key opens scresshot dialog
bindsym --release Print exec --no-startup-id xfce4-screenshooter
# in case you want scrot to take screenshots
#bindsym --release Print exec --no-startup-id scrot %Y-%m-%d-%T.png -e 'mv $f ~/Pictures/shots'
# application launchers
# translate
#bindsym $mod+t exec --no-startup-id gnome-translate
#bindsym $mod+Shift+t exec --no-startup-id zenity --info --ellipsize --text="`xclip -o | /usr/bin/translate -s google -f en -t pt -`"
# requires: zenity, xclip, translate-shell
bindsym $mod+Shift+t exec --no-startup-id zenity --info --ellipsize --text="`xclip -o | trans -b --no-ansi -e google -f en -t pt -`"
#bindsym Insert exec --no-startup-id "xfce4-terminal --title pypopup -e python3"
bindsym $mod+i exec --no-startup-id quassel
bindsym $mod+n exec --no-startup-id thunar
# NOP
#bindsym Insert nop
bindsym Caps_Lock nop
# criteria scratchpad launchers
bindsym F9 [class="quassel"] scratchpad show
bindsym F8 [instance="typora"] scratchpad show
#bindsym F7 [instance="Telegram"] scratchpad show
bindsym F7 [instance="telegram-desktop"] scratchpad show
bindsym F6 [instance="discord"] scratchpad show
# GUAKE
#toggle the dropdown
#exec_always --no-startup-id xfce4-terminal --drop-down --title "Irssi Client" -e irssi --tab --title "Bash" -e bash
#exec_always --no-startup-id xfce4-terminal --drop-down
#bindsym F12 exec --no-startup-id xfce4-terminal --drop-down
bindsym F12 exec --no-startup-id tilix --quake
########################################################################
# Window criteria directives (use xprop | grep WM_CLASS)
########################################################################
for_window [instance="feh"] floating enable
for_window [instance="arandr"] floating enable
for_window [instance="telegram-desktop"] floating enable
for_window [instance="discord"] floating enable
for_window [instance="typora"] floating enable
for_window [instance="Telegram"] floating enable
for_window [instance="TelegramDesktop"] floating enable
for_window [instance="camdesk"] floating enable
#for_window [instance="vlc"] floating enable; resize set 800 600
for_window [title="CopyQ"] floating enable
for_window [title="SwitchHosts!"] floating enable
for_window [title="pypopup"] floating enable
# floating tweaks
# window_type
# Compare the window type (_NET_WM_WINDOW_TYPE).
# Possible values are
# normal, dialog, utility, toolbar, splash, menu,
# dropdown_menu, popup_menu, tooltip and notification.
for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable
for_window [class="(?i)orage"] floating enable, move position mouse, move down 30 px
for_window [class="(?i)qemu-system"] floating enable
for_window [class="(?i)virt-manager"] floating enable
for_window [class="(?i)quassel"] floating enable
for_window [class="(?i)Gnome-calculator"] floating enable
for_window [class="(?i)lxappearance"] floating enable
for_window [class="(?i)shotwell"] floating enable
for_window [class="(?i)VirtualBox" title="(?i)Manager"] floating enable
for_window [class="(?i)VirtualBox"] floating enable
for_window [class="(?i)blueman"] floating enable
for_window [class="(?i)pinentry"] floating enable
for_window [class="(?i)nm-connection-editor"] floating enable
for_window [class="(?i)gnome-translate"] floating enable
for_window [class="(?i)xfce4-mixer"] floating enable, move position mouse, move down 30 px
for_window [class="(?i)pavucontrol"] floating enable, move position mouse, move down 30 px
# move automatically to scratchpad when opened
for_window [instance="telegram-desktop"] move scratchpad
for_window [instance="discord"] move scratchpad
for_window [instance="Telegram"] move scratchpad
for_window [instance="TelegramDesktop"] move scratchpad
for_window [instance="typora"] move scratchpad
# Switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# WARNING
# there is abug when moving windows to scratchpad like this
# the internal popup and dialog are also going to scratchpad
# for_window [instance="scratchcalc"] move scratchpad
########################################################################
# Multiple displays
########################################################################
# Move the current workspace to the next output
# (effectively toggles when you only have two outputs)
bindsym $mod+x move workspace to output right
# Put this window on the presentation output.
# bindsym $mod+x move container to output HDMI2
# Put this window on the primary output.
# bindsym $mod+x move container to output primary
# detect screen change
#exec_always --no-startup-id "pgrep --exact xev || xev -root -event randr | grep --line-buffered ScreenChangeNotify | while read change; do pkill -RTMIN+4 i3blocks; done"
# Fix workspaces to screens
#workspace 1 output HDMI1
#workspace 2 output HDMI1
#workspace 3 output HDMI1
#workspace 4 output HDMI1
#workspace 5 output LVDS1
#workspace 6 output LVDS1
#workspace 7 output LVDS1
#workspace 8 output LVDS1
########################################################################
# Appearance (use lxappearance for gtk appearance)
########################################################################
# 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.
# 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 12
# 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 12
# class border backgr. text indicator child_border
client.focused #ffffff #25252c #ffffff #2e9ef4 #FFFFFF
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
new_window pixel 2
default_border pixel 2
default_floating_border pixel 2
hide_edge_borders smart
########################################################################
# Bar
########################################################################
# Start i3bar to display a workspace bar
# py3status
bar {
status_command py3status -c ~/.i3/i3status.conf
position top
tray_output primary
tray_padding 1
output primary
#output DP1
font pango:monospace 18
colors {
background #1c1c1c
statusline #ffffff
separator #656565
# Class Border BG Text
focused_workspace #888888 #FFFFFF #000000
active_workspace #333333 #5f676a #ffffff
inactive_workspace #333333 #222222 #888888
urgent_workspace #2f343a #900000 #ffffff
}
}
bar {
status_command py3status -c ~/.i3/i3status2.conf
position top
tray_output primary
tray_padding 1
#output primary
output HDMI2
font pango:monospace 14
colors {
background #1c1c1c
statusline #ffffff
separator #656565
# Class Border BG Text
focused_workspace #888888 #FFFFFF #000000
active_workspace #333333 #5f676a #ffffff
inactive_workspace #333333 #222222 #888888
urgent_workspace #2f343a #900000 #ffffff
}
}
########################################################################
# Execs
########################################################################
exec --no-startup-id nm-applet
#exec --no-startup-id copyq
exec --no-startup-id xfce4-clipman
#exec --no-startup-id "~/Apps/SwitchHosts\!-linux-x64/SwitchHosts\!"
#exec_always --no-startup-id kupfer --no-splash
#exec_always --no-startup-id autorandr --change
exec_always --no-startup-id $HOME/.cargo/bin/i3wsr
#exec --no-startup-id sh -c "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 || /usr/lib/x86_64-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1" &
### wallpaper ###
exec --no-startup-id nitrogen --restore
#exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
#exec --no-startup-id xfce4-notes
#exec --no-startup-id 'xfce4-terminal --title botes --command "vim /home/rochacbruno/botes.md"'
exec --no-startup-id typora
exec_always ~/.i3/autostart
exec --no-startup-id 'setxkbmap -layout us -variant intl -option caps:escape'
# How to send multi commands?
# i3-msg 'exec "echo foo > /tmp/bar; echo bar > /tmp/baz"'
########################################################################
# EOF
########################################################################