aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sway/.config/sway/config
blob: e373c0b244e9e8a77fdbffff85fc8b26e79f18e3 (plain)
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
set $mod Mod4

set $left h
set $down j
set $up k
set $right l

set $menu wmenu -i -f 'monospace 12' -n$base06 -N$base00 -S$base00 -s$base09 -m$base06 -M$base0C
set $passmenu find $PASSWORD_STORE_DIR/ -name '*.gpg' -printf '%P\n' | sed "s/\.gpg$//" | sort | $menu | xargs -r pass show

set $ws01 1
set $ws02 2
set $ws03 3
set $ws04 4
set $ws05 5
set $ws06 6
set $ws07 7
set $ws08 8
set $ws09 9
set $ws10 10

include ~/.config/sway/config.d/*

# Property              Border  BG      Text    Indicator Child Border
client.focused          $base05 $base0D $base00 $base0D $base0D
client.focused_inactive $base01 $base01 $base05 $base03 $base01
client.unfocused        $base01 $base00 $base05 $base01 $base01
client.urgent           $base08 $base08 $base00 $base08 $base08
client.placeholder      $base00 $base00 $base05 $base00 $base00
client.background       $base07

font pango:sans-serif 12
workspace_layout tabbed
focus_on_window_activation focus
force_display_urgency_hint 1000 ms
default_border pixel
hide_edge_borders --i3 smart

workspace $ws01 output $out1 $out2
workspace $ws02 output $out1 $out2
workspace $ws03 output $out1 $out2
workspace $ws04 output $out1 $out2
workspace $ws05 output $out1 $out2
workspace $ws06 output $out2 $out1
workspace $ws07 output $out2 $out1
workspace $ws08 output $out2 $out1
workspace $ws09 output $out2 $out1
workspace $ws10 output $out2 $out1

output * bg ~/.local/share/gruvbox/sway.png fill

for_window [shell=".*"] inhibit_idle fullscreen
for_window [app_id="pavucontrol" title="^Volume Control$"] floating enable
for_window [class="^[Ss]team$"] floating enable
for_window [class="^[Ss]team$" title="^Steam$"] floating disable
for_window [class="^[Ss]team$" title="^Sign in to Steam$"] move to scratchpad
for_window [app_id="firefox" title="Library"] floating enable
for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill
for_window [app_id="" title="^Streamlink Twitch GUI$"] floating enable
for_window [app_id="deno" title="^Peek preview$"] resize set width 980px
for_window [app_id="discord" title="^Discord Updater$"] move to scratchpad

assign [app_id="mpv"] $ws06
assign [app_id="discord"] $ws07

no_focus [app_id="deno" title="^Peek preview$"]

input type:pointer {
    accel_profile flat
}

input type:touchpad {
    tap enabled
    natural_scroll enabled
}

input type:keyboard {
    xkb_options "caps:escape"
}

floating_modifier $mod

bindsym $mod+q kill
bindsym $mod+Shift+c reload
bindsym $mod+Shift+Escape exec swaynag -t warning -m 'Exit sway?' -B 'Yes' 'swaymsg exit'
bindsym $mod+Delete exec loginctl lock-session
bindsym $mod+Escape exec powermenu | $menu -l 6 | powermenu
bindsym Pause exec swaymsg "output * power toggle"

bindsym $mod+return exec $TERMINAL
bindsym $mod+Shift+return exec sshr --resolve --port 22 --scan 0.0.0.0/24 | $menu | xargs sway_ssh
bindsym $mod+w exec $BROWSER

bindsym Print exec slurp | grim -g - - | wl-copy --type image/png
bindsym $mod+Print exec /usr/share/sway/scripts/grimshot --notify save area

bindsym $mod+space exec j4-dmenu-desktop --dmenu="$menu" --term=$TERMINAL
bindsym $mod+shift+space exec wmenu_path | $menu | xargs swaymsg exec --

bindsym $mod+v exec (cliphist list | $menu -l 10 || (cliphist list | head -n1)) | cliphist decode | wl-copy
bindsym $mod+Shift+v exec cliphist list | $menu -l 10 | cliphist delete

bindsym $mod+p exec $passmenu -c
bindsym $mod+Shift+p exec $passmenu | wtype -

bindsym $mod+y exec yubikey-oath-dmenu --notify --clipboard --menu-cmd "$menu -l 10"
bindsym $mod+Shift+y exec yubikey-oath-dmenu --notify --type --menu-cmd "$menu -l 10"

bindsym XF86AudioRaiseVolume exec wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+
bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindsym XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym XF86MonBrightnessUp exec brightnessctl set +5%

bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right

bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

bindsym Mod1+Tab exec sway-overfocus group-rw group-dw
bindsym Mod1+Shift+Tab exec sway-overfocus group-lw group-uw

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 $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

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

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

bindsym $mod+Ctrl+6 workspace back_and_forth
bindsym $mod+Tab workspace back_and_forth

bindsym $mod+s workspace $ws06
bindsym $mod+d workspace $ws07
bindsym $mod+1 workspace $ws01
bindsym $mod+2 workspace $ws02
bindsym $mod+3 workspace $ws03
bindsym $mod+4 workspace $ws04
bindsym $mod+5 workspace $ws05
bindsym $mod+6 workspace $ws06
bindsym $mod+7 workspace $ws07
bindsym $mod+8 workspace $ws08
bindsym $mod+9 workspace $ws09
bindsym $mod+0 workspace $ws10

bindsym $mod+Shift+s move container to workspace $ws06, workspace $ws06
bindsym $mod+Shift+d move container to workspace $ws07, workspace $ws07
bindsym $mod+Shift+1 move container to workspace $ws01, workspace $ws01
bindsym $mod+Shift+2 move container to workspace $ws02, workspace $ws02
bindsym $mod+Shift+3 move container to workspace $ws03, workspace $ws03
bindsym $mod+Shift+4 move container to workspace $ws04, workspace $ws04
bindsym $mod+Shift+5 move container to workspace $ws05, workspace $ws05
bindsym $mod+Shift+6 move container to workspace $ws06, workspace $ws06
bindsym $mod+Shift+7 move container to workspace $ws07, workspace $ws07
bindsym $mod+Shift+8 move container to workspace $ws08, workspace $ws08
bindsym $mod+Shift+9 move container to workspace $ws09, workspace $ws09
bindsym $mod+Shift+0 move container to workspace $ws10, workspace $ws10

bindsym $mod+minus move scratchpad
bindsym $mod+plus scratchpad show

bindsym $mod+f fullscreen
bindsym $mod+Shift+f floating toggle

bindsym $mod+backslash splitv
bindsym $mod+e layout toggle split tabbed

bindsym $mod+r mode 'resize'
mode 'resize' {
    bindsym $left resize shrink width 10px
    bindsym $down resize grow height 10px
    bindsym $up resize shrink height 10px
    bindsym $right resize grow width 10px

    bindsym Left resize shrink width 10px
    bindsym Down resize grow height 10px
    bindsym Up resize shrink height 10px
    bindsym Right resize grow width 10px

    bindsym Escape mode 'default'
}

bar {
    status_command i3status-rs
    font pango:monospace 12
    position top
    strip_workspace_name yes
    tray_padding 5
    colors {
        background $base00
        separator  $base01
        statusline $base04

        # State             Border  BG      Text
        focused_workspace   $base05 $base0D $base00
        active_workspace    $base05 $base03 $base00
        inactive_workspace  $base03 $base01 $base05
        urgent_workspace    $base08 $base08 $base00
        binding_mode        $base00 $base0A $base00
    }
}

include /etc/sway/config.d/*

exec_always {
    ~/.local/bin/rss-status
    import-gsettings
    systemctl --user start sway-session.target
}