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
|
set $mod Mod1
set $mod2 Mod4
set $term foot #alacritty
set $background ~/pictures/desktops/mountains_night_sky_dark.jpg
set $screenshot grim ~/pictures/screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
set $screenclip slurp | grim -g - ~/pictures/screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
font pango:Inconsolata, Icons 13
# kill focused window
bindsym $mod+Shift+q kill
# Mouse behaviour wrt windows.
focus_follows_mouse no
# sleep and lock
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'
# Shortcuts
bindsym $mod+Return exec $term
bindsym $mod+F11 exec $screenshot
bindsym $mod+F12 exec $screenclip
# background
output * bg $background fill
input type:touchpad {
click_method clickfinger
natural_scroll enabled
middle_emulation disabled
}
# change focus
bindsym $mod2+j focus left
bindsym $mod2+k focus right
#bindsym $mod+l focus up
#bindsym $mod+semicolon focus down
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move right
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move down
# split in horizontal orientation
bindsym $mod+Shift+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+Shift+f fullscreen toggle
bindsym $mod+f floating toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+Shift+s layout stacking
bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+d focus child
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"
# 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
# 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
# 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
for_window [class="^Chromium$"] border none
for_window [class="tasty.javafx.launcher.LauncherFxApp"] border none
for_window [title="Confirmation"] floating enable
for_window [app_id="com.nextcloud.desktopclient.nextcloud"] floating enable
for_window [app_id="com.nextcloud.desktopclient.nextcloud"] border none
for_window [title="Oracle VM VirtualBox Manager"] floating enable
for_window [app_id="thunar"] floating enable
for_window [app_id="soffice"] floating enable
for_window [class="^lxf$"] floating enable
for_window [app_id="system-config-printer"] floating enable
for_window [app_id="epiphany"] border none
for_window [app_id="darktable"] border none
for_window [class="Darktable"] border none
for_window [app_id="python3"] border none, floating enable
for_window [class="^URxvt"] border none
for_window [app_id="firefoxdeveloperedition"] border none
for_window [class="firefoxdeveloperedition"] border none
for_window [app_id="vivaldi-snapshot"] border none
for_window [app_id="vivaldi-stable"] border none
for_window [class="^qutebrowser"] border none
for_window [app_id="org.qutebrowser.qutebrowser"] border none
for_window [app_id="^Alacritty"] border none
for_window [app_id="^foot"] border none
for_window [class="Slack"] border none
for_window [class="Pavucontrol"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [class="Yad"] floating enable
for_window [class="feh"] floating enable
for_window [class="QtPass"] floating enable
for_window [app_id="mpv"] floating enable
for_window [class="hangouts.google.com"] floating disable
for_window [class="hangouts.google.com"] border normal
for_window [app_id="gedit"] floating enable
for_window [app_id="org.kde.kdenlive"] border none
assign [class="qutebrowser"] $ws2
assign [app_id="org.qutebrowser.qutebrowser"] $ws2
assign [class="Firefox Developer"] $ws4
assign [class="Slack"] $ws6
assign [class="Vivaldi"] $ws2
assign [class="Darktable"] $ws3
assign [app_id="darktable"] $ws3
assign [title="Oracle VM VirtualBox Manager"] $ws4
#workspace switching
bindsym $mod+k workspace next
bindsym $mod+j workspace prev
#bindsym $mod+space exec dmenu_run
#Volumn and Brightness
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym --locked XF86MonBrightnessUp exec --no-startup-id light -A 10
bindsym --locked XF86MonBrightnessDown exec --no-startup-id light -U 10
set $alsacard 1
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e 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 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
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Input configuration
input * {
xkb_variant nodeadkeys
xkb_options ctrl:nocaps
}
input "1:1:AT_Translated_Set_2_keyboard" {
repeat_delay 250
repeat_rate 25
}
exec vivaldi-stable --ozone-platform=wayland --enable-features=UseOzonePlatform &
exec foot &
exec mako &
exec mpd &
# clipboard manager
exec wl-paste -t text --watch clipman store --max-items=200 --histpath="~/.local/share/clipman-primary.json"
#bindsym $mod+c exec alacritty --class 'smsearch' --command bash -c 'fzclip | xargs -r swaymsg -t command exec'
bindsym $mod+c exec foot --app-id=smsearch bash -c 'fzclip | xargs -r swaymsg -t command exec'
# app launcher
#bindsym $mod+Space exec alacritty --class 'launcher' --command bash -c 'compgen -c | sort -u | fzf | xargs -r swaymsg -t command exec'
bindsym $mod+Space exec foot --app-id=launcher bash -c "compgen -c | sort -u | fzf --bind 'tab:up' | xargs -r swaymsg -t command exec"
# pass chooser
#bindsym $mod+p exec alacritty --class 'launcher' --command bash -c 'pass clip --fzf | xargs -r swaymsg -t command exec'
bindsym $mod+p exec foot --app-id=launcher bash -c 'pass clip --fzf | xargs -r swaymsg -t command exec'
for_window [app_id="^launcher$"] floating enable, border none, resize set width 25 ppt height 20 ppt, move position 0 px 0 px
#snippet manager
#bindsym $mod+s exec alacritty --class 'smsearch' --command bash -c 'fzsnip | xargs -r swaymsg -t command exec'
bindsym $mod+s exec foot --app-id=smsearch bash -c 'fzsnip | xargs -r swaymsg -t command exec'
#bookmarks search
#bindsym $mod+b exec alacritty --class 'smsearch' --command bash -c 'url=$(cat .config/qutebrowser/bookmarks/urls | fzf | cut -d \" \" -f 1) && qutebrowser "$url" | xargs -r swaymsg -t command exec'
bindsym $mod+b exec foot --app-id=smsearch bash -c 'url=$(cat .config/qutebrowser/bookmarks/urls | fzf | cut -d \" \" -f 1) && qutebrowser "$url" | xargs -r swaymsg -t command exec'
for_window [app_id="^smsearch$"] floating enable, border none, resize set width 80 ppt height 60 ppt, move position 0 px 0 px
#bindsym $mod+n exec alacritty --class 'smsearch' --command bash -c 'notes'
bindsym $mod+n exec foot --app-id=smsearch bash -c 'notes'
for_window [app_id="^smsearch$"] floating enable, border none, resize set width 80 ppt height 60 ppt, move position 0 px 0 px
exec_always ~/.config/waybar/waybar.sh
|