-
Notifications
You must be signed in to change notification settings - Fork 0
/
i3.conf
367 lines (313 loc) · 14.6 KB
/
i3.conf
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
# i3 config file (v5)
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod4
# set default desktop layout (default is tiling)
# workspace_layout tabbed <stacking|tabbed>
# Configure border style <normal|1pixel|pixel xx|none|pixel>
new_window pixel 1
new_float normal
# change borders
bindsym $mod+b border toggle 1
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:DejaVu Sans Mono 8
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Escape exec i3-sensible-terminal
# kill focused window
bindsym $mod+Shift+q kill
# start program launcher
bindsym $mod+d exec rofi -show combi
bindsym $mod+Ctrl+d exec rofi -show calc
# Pulse Audio controls
#bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 1 +5%;exec killall -s USR1 py3status #increase sound volume
#bindsym XF86AudioLowerVolume exec pactl set-sink-volume 1 -5%;exec killall -s USR1 py3status #decrease sound volume
#bindsym XF86AudioMute exec pactl set-sink-mute 1 toggle;exec killall -s USR1 py3status # mute sound
# Multimedia keys
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# Start Applications
bindsym $mod+F2 exec google-chrome-stable
bindsym $mod+F3 exec thunar
#bindsym $mod+F3 exec ranger
bindsym $mod+Shift+F3 exec gksu thunar
#bindsym $mod+t exec --no-startup-id pkill compton
#bindsym $mod+Ctrl+t exec --no-startup-id compton -b
bindsym Print exec --no-startup-id i3-scrot
bindsym $mod+Print --release exec --no-startup-id i3-scrot -w
bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
focus_follows_mouse no
# 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
# Move workspaces around
bindsym $mod+Shift+Ctrl+Up move workspace to output up
bindsym $mod+Shift+Ctrl+Left move workspace to output left
bindsym $mod+Shift+Ctrl+Right move workspace to output right
bindsym $mod+Shift+Ctrl+Down move workspace to output down
bindsym $mod+Shift+Ctrl+h move workspace to output up
bindsym $mod+Shift+Ctrl+j move workspace to output left
bindsym $mod+Shift+Ctrl+k move workspace to output right
bindsym $mod+Shift+Ctrl+l move workspace to output down
# split orientation
#bindsym $mod+h split h;exec notify-send 'tile horizontally'
#bindsym $mod+v split v;exec notify-send 'tile vertically'
bindsym $mod+e split toggle
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
popup_during_fullscreen smart
# change container layout (stacked, tabbed, toggle split)
#bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+Shift+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# toggle sticky
bindsym $mod+Shift+s sticky toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# bindsym $mod+Shift+z move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
# bindsym $mod+z scratchpad show
#navigate workspaces next / previous
bindsym $mod+Ctrl+Right workspace next
bindsym $mod+Ctrl+Left workspace prev
bindsym $mod+Tab workspace back_and_forth
# toggle do not disturb
bindsym $mod+Shift+d exec xfconf-query -c xfce4-notifyd --property /do-not-disturb --toggle;exec notify-send 'Do-Not-Disturb toggled'
# rofi based pass
bindsym $mod+x exec passmenu
# scratchpad terminal
for_window [title="^__scratchpad"] move scratchpad, resize set 816 458, scratchpad show
bindsym $mod+z exec --no-startup-id \
"[ \\"$(i3-msg '[title=^__scratchpad] scratchpad show')\\" = '[{\\"success\\":true}]' ] || xfce4-terminal --initial-title '__scratchpad'"
# Name Workspaces using i3-input (requires jq)
#bindsym $mod+Shift+n exec "i3-input -F \\"rename workspace to \\\\"$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).num') %s\\\\"\\" -P 'New workspace name: '"
bindsym $mod+n exec ~/.bin/rofi_i3_name
# 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"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
# Move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace number $ws1
bindsym $mod+Ctrl+2 move container to workspace number $ws2
bindsym $mod+Ctrl+3 move container to workspace number $ws3
bindsym $mod+Ctrl+4 move container to workspace number $ws4
bindsym $mod+Ctrl+5 move container to workspace number $ws5
bindsym $mod+Ctrl+6 move container to workspace number $ws6
bindsym $mod+Ctrl+7 move container to workspace number $ws7
bindsym $mod+Ctrl+8 move container to workspace number $ws8
# Move to workspace with focused container
bindsym $mod+Shift+1 move container to workspace number $ws1; workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2; workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3; workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4; workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5; workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6; workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7; workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8; workspace number $ws8
# Additional worksaces
bindsym $mod+backslash exec ~/.bin/rofi_i3_ws
bindsym $mod+Ctrl+backslash exec ~/.bin/rofi_i3_ws move
bindsym $mod+Shift+backslash exec ~/.bin/rofi_i3_ws drag
# Open applications on specific workspaces
assign [class="Thunderbird"] number $ws8
# assign [class="thunar"] number $ws3
# Open specific applications in floating mode
for_window [title="File Transfer*"] floating enable border normal
for_window [class="Galculator"] floating enable border pixel 1
for_window [class="GParted"] floating enable border normal
for_window [class="Lightdm-gtk-greeter-settings"] floating enable
for_window [class="Lxappearance"] floating enable sticky enable border normal
for_window [class="Manjaro-hello"] floating enable
for_window [class="Manjaro Settings Manager"] floating enable border normal
for_window [title="MuseScore: Play Panel"] floating enable
for_window [class="Nitrogen"] floating enable sticky enable border normal
for_window [class="Pamac-manager"] floating enable border normal
for_window [class="Pavucontrol"] floating enable
for_window [class="qt5ct"] floating enable sticky enable border normal
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
for_window [class="Simple-scan"] floating enable border normal
for_window [class="(?i)System-config-printer.py"] floating enable border normal
for_window [class="Timeset-gui"] floating enable border normal
for_window [class="(?i)virtualbox"] floating enable border normal
for_window [class="*mathworks*" title="^Fig"] floating enable border normal
for_window [class="Minecraft*"] floating enable border pixel 1
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# 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'"
# Set shut down, restart and locking features
bindsym $mod+Shift+9 exec --no-startup-id i3exit suspend
bindsym $mod+0 mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
bindsym e exec --no-startup-id i3exit logout, 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"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym Mod1+1 exec --no-startup-id ~/.bin/i3_tab 1
bindsym Mod1+2 exec --no-startup-id ~/.bin/i3_tab 2
bindsym Mod1+3 exec --no-startup-id ~/.bin/i3_tab 3
bindsym Mod1+4 exec --no-startup-id ~/.bin/i3_tab 4
bindsym Mod1+5 exec --no-startup-id ~/.bin/i3_tab 5
bindsym Mod1+6 exec --no-startup-id ~/.bin/i3_tab 6
bindsym Mod1+7 exec --no-startup-id ~/.bin/i3_tab 7
bindsym Mod1+8 exec --no-startup-id ~/.bin/i3_tab 8
for_window [title="Picture-in-picture"] "focus;exec --no-startup-id ~/.bin/i3_float_vid add"
bindsym $mod+Shift+v exec --no-startup-id ~/.bin/i3_float_vid add
bindsym $mod+v exec --no-startup-id ~/.bin/i3_float_vid toggle
set $mode_vid_float float location [QWE ASD], Mod+v delete
bindsym $mod+Ctrl+v mode "$mode_vid_float"
mode "$mode_vid_float" {
bindsym q exec --no-startup-id ~/.bin/i3_float_vid move TOP_L;mode "default"
bindsym w exec --no-startup-id ~/.bin/i3_float_vid move TOP_C;mode "default"
bindsym e exec --no-startup-id ~/.bin/i3_float_vid move TOP_R;mode "default"
bindsym a exec --no-startup-id ~/.bin/i3_float_vid move BOT_L;mode "default"
bindsym s exec --no-startup-id ~/.bin/i3_float_vid move BOT_C;mode "default"
bindsym d exec --no-startup-id ~/.bin/i3_float_vid move BOT_R;mode "default"
bindsym $mod+v exec --no-startup-id ~/.bin/i3_float_vid remove;mode "default"
}
# 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 5 px or 5 ppt
# bindsym k resize grow height 5 px or 5 ppt
# bindsym l resize shrink height 5 px or 5 ppt
# bindsym semicolon resize grow width 5 px or 5 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"
bindsym $mod+c exec --no-startup-id ~/.bin/rofi_monitors
# Fix displays
bindsym $mod+Mod1+c exec --no-startup-id ~/.bin/rofi_monitors reset
bindsym $mod+Ctrl+c exec --no-startup-id ~/.bin/i3_mirror
#mode "displays" {
# bindsym r exec --no-startup-id xrandr --auto, mode "default"
# bindsym f exec --no-startup-id xrandr --output eDP1 \
# --scale-from 1920x1080 --panning 1920x1080, mode "default"
# bindsym t exec --no-startup-id xrandr --output HDMI1 --auto --pos 0x0\
# --output DP2 --auto --right-of HDMI1\
# --output eDP1 --pos 1237x1080, mode "default"
## bindsym d exec --no-startup-id xrandr --output DP2-3 --auto --pos 0x0\
## --output eDP1 --pos 554x1080 --primary;\
# bindsym d exec --no-startup-id xrandr --output DP2-3 --auto --pos 0x0\
# --output DP2-1 --auto --right-of DP2-3 \
# --output eDP1 --pos 554x1080 --primary, mode "default"
# bindsym n exec --no-startup-id xrandr |\
# awk '/ connected/ && !/eDP1/ {print $1}' |\
# xargs -I % sh -c 'xrandr --output % --off', mode "default"
# bindsym Up exec --no-startup-id xrandr --output\
# $(xrandr | awk '/ connected/ && !/eDP1/ {print $1}'|awk 'FNR==1{print}')\
# --auto --above eDP1, mode "default"
# bindsym Down exec --no-startup-id xrandr --output\
# $(xrandr | awk '/ connected/ && !/eDP1/ {print $1}'|awk 'FNR==1{print}')\
# --auto --below eDP1, mode "default"
# bindsym Left exec --no-startup-id xrandr --output\
# $(xrandr | awk '/ connected/ && !/eDP1/ {print $1}'|awk 'FNR==1{print}')\
# --auto --left-of eDP1, mode "default"
# bindsym Right exec --no-startup-id xrandr --output\
# $(xrandr | awk '/ connected/ && !/eDP1/ {print $1}'|awk 'FNR==1{print}')\
# --auto --right-of eDP1, mode "default"
#
# # exit display mode: Enter or Escape
# bindsym Return mode "default"
# bindsym Escape mode "default"
#}
# Lock screen
bindsym $mod+9 exec --no-startup-id blurlock
# Autostart applications
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
#exec compton -b
exec --no-startup-id nm-applet
exec --no-startup-id xfce4-power-manager
exec --no-startup-id pamac-tray
exec --no-startup-id volumeicon
exec --no-startup-id blueman-applet
exec --no-startup-id thunderbird
#exec --no-startup-id xautolock -time 10 -locker blurlock
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
# status_command i3status
# status_command py3status -c ~/py3status.conf
status_command i3blocks
position bottom
## please set your primary output first. Example: 'xrandr --output eDP1 --primary'
tray_output primary
# tray_output eDP1
font pango:Inconsolata 9
# font xft:Noto Sans 8.5
# 8.5-11
# strip_workspace_numbers yes
}
bindsym $mod+F1 exec ~/.bin/i3-help