-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsway
351 lines (308 loc) · 11.6 KB
/
sway
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
### Variables
## Keys
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
## Default Apps
set $term foot
#set $menu rofi -modes "drun,run,filebrowser,window" -show drun | xargs swaymsg exec --
#set $menu rofi -m $(expr $(swaymsg -t get_tree | jq '.nodes | map([recurse(.nodes[]?, .floating_nodes[]?) | .focused] | any) | index(true)') - 1) -show drun -run-command 'swaymsg exec -- {cmd}'
set $menu rofi -m $(swaymsg -t get_outputs | jq 'map(select(.active) | .focused) | index(true)') -show 'combi'
set $wifi foot --title "wifi" -e impala
set $bluetooth foot --title "bluetooth" -e bluetuith
set $locker 'swaylock -f --screenshots --clock --timestr %H:%M:%S --effect-blur 7x5 --effect-scale 0.5'
set $editor foot --title "nvim" -e nvim
## Workspaces
set $ws1 1:term
set $ws2 2:code
set $ws3 3:work
set $ws4 4:overflow
set $ws5 5:firefox
set $ws6 6:docs
set $ws7 7:meet
set $ws8 8:notes
set $ws9 9:pass
set $ws10 10:media
set $ws11 11:signal
set $ws12 12:slack
set $ws13 13:spotify
set $ws14 14:F4
set $ws15 15:F5
set $ws16 16:F6
set $ws17 17:F7
set $ws18 18:F8
set $ws19 19:F9
set $ws20 20:F10
## Outputs
set $laptop "Sharp Corporation 0x14F9 Unknown"
set $homeDesk "Dell Inc. DELL U2723QE 9H81H34"
set $workDesk "LG Electronics LG Ultra HD 0x0003EB3C"
## Theming
set $wallpaper /usr/share/backgrounds/archlinux/small.png
### Output configuration
output * scale 1 bg $wallpaper fill
output $laptop scale 1 pos 960,2160
output $homeDesk pos 0,0
output $workdesk pos 0,0
smart_gaps on
gaps inner 10
default_border pixel 3
default_floating_border normal
hide_edge_borders smart
font pango:Hack Nerd Font 11
### Autostart
exec swayidle -w \
timeout 300 $locker \
timeout 600 'swaymsg "output * power off"' \
resume 'swaymsg "output * power on"' \
before-sleep $locker
exec_always ~/.config/waybar/waybar.sh
exec_always autotiling-rs
exec rofi-polkit-agent
exec wlsunset -l 55.9 -L -3.1
### Input configuration
input "type:keyboard" {
# Rebind CapsLock as Control
xkb_options ctrl:nocaps
}
input type:touchpad {
tap enabled
natural_scroll enabled
}
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Start editor
bindsym $mod+Shift+e exec $editor
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
bindsym $mod+g exec rofi -modes "window" -show window
bindsym $mod+q exec rofi -modes "filebrowser" -show filebrowser
bindsym $mod+End exec $wifi
bindsym $mod+Home exec $bluetooth
bindsym $mod+Tab exec rofi-playerctl
bindsym $mod+Insert exec rofimoji
bindsym $mod+Shift+Insert exec rofi -modes "nerdy" -show "nerdy"
bindsym $mod+Shift+b exec rofi-bluetooth
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow 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 the focused window with the same, but add Shift
bindsym $mod+Ctrl+$left move workspace to output left
bindsym $mod+Ctrl+$down move workspace to output down
bindsym $mod+Ctrl+$up move workspace to output up
bindsym $mod+Ctrl+$right move workspace to output right
# Ditto, with arrow keys
bindsym $mod+Ctrl+Left move workspace to output left
bindsym $mod+Ctrl+Down move workspace to output down
bindsym $mod+Ctrl+Up move workspace to output up
bindsym $mod+Ctrl+Right move workspace to output right
#
# Switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym $mod+F1 workspace $ws11
bindsym $mod+F2 workspace $ws12
bindsym $mod+F3 workspace $ws13
bindsym $mod+F4 workspace $ws14
bindsym $mod+F5 workspace $ws15
bindsym $mod+F6 workspace $ws16
bindsym $mod+F7 workspace $ws17
bindsym $mod+F8 workspace $ws18
bindsym $mod+F9 workspace $ws19
bindsym $mod+F10 workspace $ws20
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
bindsym $mod+Shift+F1 move container to workspace $ws11
bindsym $mod+Shift+F2 move container to workspace $ws12
bindsym $mod+Shift+F3 move container to workspace $ws13
bindsym $mod+Shift+F4 move container to workspace $ws14
bindsym $mod+Shift+F5 move container to workspace $ws15
bindsym $mod+Shift+F6 move container to workspace $ws16
bindsym $mod+Shift+F7 move container to workspace $ws17
bindsym $mod+Shift+F8 move container to workspace $ws18
bindsym $mod+Shift+F9 move container to workspace $ws19
bindsym $mod+Shift+F10 move container to workspace $ws20
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus 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
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
## Window Quick Switching
# window switch setting
set $mode_set_switch_window "set_switch_window: [0]-[9]"
mode $mode_set_switch_window {
bindsym 1 mark 1; mode "default"
bindsym 2 mark 2; mode "default"
bindsym 3 mark 3; mode "default"
bindsym 4 mark 4; mode "default"
bindsym 5 mark 5; mode "default"
bindsym 6 mark 6; mode "default"
bindsym 7 mark 7; mode "default"
bindsym 8 mark 8; mode "default"
bindsym 9 mark 9; mode "default"
bindsym 0 mark 0; mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+ctrl+t mode $mode_set_switch_window
set $mode_switch_window "switch_window: [0]-[9]"
mode $mode_switch_window {
bindsym 1 [con_mark="1"] focus; mode "default"
bindsym 2 [con_mark="2"] focus; mode "default"
bindsym 3 [con_mark="3"] focus; mode "default"
bindsym 4 [con_mark="4"] focus; mode "default"
bindsym 5 [con_mark="5"] focus; mode "default"
bindsym 6 [con_mark="6"] focus; mode "default"
bindsym 7 [con_mark="7"] focus; mode "default"
bindsym 8 [con_mark="8"] focus; mode "default"
bindsym 9 [con_mark="9"] focus; mode "default"
bindsym 0 [con_mark="0"] focus; mode "default"
bindsym t mode $mode_set_switch_window
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+t mode $mode_switch_window
## Custom
# Special Keys
bindsym --locked XF86AudioLowerVolume exec wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-
bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+
bindsym --locked XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindsym --locked XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindsym --locked XF86MonBrightnessDown exec brightnessctl -e set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl -e set 5%+
bindsym --locked XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioPrev exec playerctl previous
bindsym $mod+x [urgent=latest] focus
bindsym $mod+m exec rofi-ykman
set $mode_system System (l) lock, (e) logout, (s) suspend, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id $locker, mode "default"
bindsym e exec --no-startup-id swaymsg exit, mode "default"
bindsym s exec --no-startup-id systemctl suspend, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+P mode "$mode_system"
bindsym $mod+Escape exec makoctl dismiss
bindsym $mod+Shift+Escape exec makoctl restore
bindcode 107 exec grimshot savecopy active
bindcode Shift+107 exec grimshot savecopy area
bindcode Shift+Ctrl+107 exec grimshot savecopy output
bindcode Ctrl+107 exec grimshot savecopy window
for_window [shell="xwayland"] title_format "[X] %title"
assign [class="Slack"] $ws12
assign [class="Signal"] $ws11
assign [app_id="firefox-developer-edition"] $ws5
assign [app_id="LibreWolf"] $ws5
assign [instance="spotify"] $ws13
assign [class="Standard Notes"] $ws8
assign [class="1Password"] $ws9
assign [class="Proton Pass"] $ws9
assign [app_id="org.zealdocs.zeal"] $ws6
include ~/.config/sway/config.d/*
include /etc/sway/config.d/*