This repository has been archived by the owner on Apr 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
278 lines (224 loc) · 10.2 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
# 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!
set $alt Mod1
set $sup Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Roboto 14px
title_align center
# 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
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
#exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
#set $refresh_i3status killall -SIGUSR1 i3status
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
#bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$alt to drag floating windows to their wanted position
floating_modifier $alt
# start a terminal
bindsym $alt+Return exec --no-startup-id kitty
# kill focused window
bindsym $alt+Shift+q kill
# 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 $alt+d exec --no-startup-id i3-dmenu-desktop
# change focus
#bindsym $alt+j focus left
#bindsym $alt+k focus down
#bindsym $alt+i focus up
#bindsym $alt+l focus right
# alternatively, you can use the cursor keys:
bindsym $alt+Left focus left
bindsym $alt+Down focus down
bindsym $alt+Up focus up
bindsym $alt+Right focus right
# move focused window
#bindsym $alt+Shift+j move left
#bindsym $alt+Shift+k move down
#bindsym $alt+Shift+i move up
#bindsym $alt+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $alt+Shift+Left move left
bindsym $alt+Shift+Down move down
bindsym $alt+Shift+Up move up
bindsym $alt+Shift+Right move right
# split in horizontal orientation
bindsym $alt+h split h
# split in vertical orientation
bindsym $alt+v split v
# enter fullscreen mode for the focused container
bindsym $alt+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $alt+s layout stacking
bindsym $alt+w layout tabbed
bindsym $alt+e layout toggle split
# toggle tiling / floating
bindsym $alt+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $alt+space focus mode_toggle
# focus the parent container
bindsym $alt+a focus parent
# focus the child container
bindsym $alt+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.
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 $alt+1 workspace number $ws1
bindsym $alt+2 workspace number $ws2
bindsym $alt+3 workspace number $ws3
bindsym $alt+4 workspace number $ws4
bindsym $alt+5 workspace number $ws5
bindsym $alt+6 workspace number $ws6
bindsym $alt+7 workspace number $ws7
bindsym $alt+8 workspace number $ws8
bindsym $alt+9 workspace number $ws9
bindsym $alt+0 workspace number $ws10
# move focused container to workspace
bindsym $alt+Shift+1 move container to workspace number $ws1
bindsym $alt+Shift+2 move container to workspace number $ws2
bindsym $alt+Shift+3 move container to workspace number $ws3
bindsym $alt+Shift+4 move container to workspace number $ws4
bindsym $alt+Shift+5 move container to workspace number $ws5
bindsym $alt+Shift+6 move container to workspace number $ws6
bindsym $alt+Shift+7 move container to workspace number $ws7
bindsym $alt+Shift+8 move container to workspace number $ws8
bindsym $alt+Shift+9 move container to workspace number $ws9
bindsym $alt+Shift+0 move container to workspace number $ws10
# switch to the previous or next workspace with [ and ]
bindcode $alt+34 workspace prev
bindcode $alt+35 workspace next
# switch to the previous or next workspace with meta+arrow
bindcode $sup+113 workspace prev
bindcode $sup+114 workspace next
# reload the configuration file
bindsym $alt+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $alt+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $alt+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 j resize shrink width 10 px or 10 ppt
bindsym i 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
# 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 $alt+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $alt+r mode "default"
}
bindsym $alt+r mode "resize"
# Borders
for_window [class="^.*"] border pixel 2
smart_borders on
#smart_borders no_gaps
# Set colors from Xresources
# Change 'color7' and 'color2' to whatever colors you want i3 to use
# from the generated scheme.
# NOTE: The hex color in the lines below is the color i3 will use if
# it fails to get colors from Xresources.
set_from_resource $bg i3wm.background #000000
set_from_resource $fg i3wm.foreground #FFFFFF
set_from_resource $ac i3wm.color1 #368CC9
set_from_resource $ur i3wm.color2 #E03E56
set $white #FFFFFF
set $black #000000
# Frame colors
# class border bg text indictr child bdr
client.focused $ac $ac $white $ac $ac
client.focused_inactive $bg $bg $fg $bg $bg
client.unfocused $bg $bg $fg $bg $bg
client.urgent $ur $ur $white $ur $ur
client.placeholder $bg $bg $fg $bg $bg
gaps inner 15
gaps outer 0
# Always focus window when activated
focus_on_window_activation focus
# Always float certain windows
for_window [class="processing-core-PApplet"] floating enable
# [L]ock
bindsym $alt+Shift+l exec ~/scripts/lock
# Kill misbehaving window with alt+F4
bindcode --release $alt+70 exec xkill
# Toggle gaps
bindsym $alt+g gaps inner all toggle 18
# Sticky window
bindsym $alt+Shift+s sticky toggle
## Keyboard backlight control
bindsym XF86KbdBrightnessUp exec kb-backlight -i 10
bindsym XF86KbdBrightnessDown exec kb-backlight -d 10
## Screen backlight control
bindsym XF86MonBrightnessUp exec light -A 5
bindsym XF86MonBrightnessDown exec light -U 5
# Application shortcuts
bindsym $alt+Shift+a exec --no-startup-id gtk-launch atom
bindsym $alt+Shift+b exec --no-startup-id gtk-launch firefox
bindsym $alt+Shift+f exec --no-startup-id i3-sensible-terminal pypy /usr/bin/ranger
bindsym $alt+Shift+g exec --no-startup-id glimpse-editor
# rofi menus
bindsym $sup+space exec --no-startup-id rofi -show drun -drun-display-format {name}
bindsym $sup+Tab exec --no-startup-id rofi -show window -width 50
bindsym $sup+Escape exec --no-startup-id ~/scripts/rofi/power
bindsym XF86PowerOff exec --no-startup-id ~/scripts/rofi/power
bindsym $sup+slash exec --no-startup-id rofi -show file-browser -width 1000 -columns 3 -scroll-method 0
bindsym $sup+equal exec --no-startup-id LC_MONETARY=en_US.UTF-8 rofi -show calc -lines 0 -no-show-match -no-sort -no-history -calc-command "echo -n '{result}'" -kb-accept-custom Return -kb-accept-entry Control+Return | clipster -c
bindsym $sup+b exec --no-startup-id ~/scripts/rofi/backupctl
bindsym $sup+c exec --no-startup-id rofi-clipster
bindsym $sup+d exec --no-startup-id ~/scripts/rofi/wiktionary
bindsym $sup+e exec --no-startup-id rofimoji
bindsym $sup+n exec --no-startup-id rofimoji --prompt="icon" --files nerd_font
bindsym $sup+m exec --no-startup-id ~/scripts/rofi/usb
bindsym $sup+p exec --no-startup-id rofi-rbw
bindsym $sup+r exec --no-startup-id rofi -show run
bindsym $sup+s exec --no-startup-id rofi -show ssh
bindsym $sup+t exec --no-startup-id ~/scripts/rofi/tweet
bindsym $sup+u exec --no-startup-id rofimoji --prompt="unichr" --files all
# macOS-like screenshots
bindsym $sup+Shift+2 exec --no-startup-id maim -ui $(xdotool getactivewindow) ~/Pictures/Screenshots/$(date -Iseconds).png
bindsym $sup+Control+Shift+2 exec --no-startup-id maim -ui $(xdotool getactivewindow) | xclip -selection clipboard -t image/png
bindsym $sup+Shift+3 exec --no-startup-id maim -u ~/Pictures/Screenshots/$(date -Iseconds).png
bindsym $sup+Control+Shift+3 exec --no-startup-id maim -u | xclip -selection clipboard -t image/png
bindsym $sup+Shift+4 exec --no-startup-id maim -us ~/Pictures/Screenshots/$(date -Iseconds).png
bindsym $sup+Control+Shift+4 exec --no-startup-id maim -us | xclip -selection clipboard -t image/png
# Startup scripts
exec --no-startup-id ~/scripts/startup-daemons
exec --no-startup-id ~/scripts/startup-apps
exec_always --no-startup-id ~/scripts/polybar