aboutsummaryrefslogtreecommitdiff
path: root/src/sway/020_config
blob: 80531c1de46b6bd8bd3b14a5449a43f402a6e7bb (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
#
# ~~~ sway config
#

#
# ~~~ system

# displays
output eDP-1 pos 0 900
output DP-2 pos 1920 0

# brightness
bindsym --locked XF86MonBrightnessUp exec xbacklight -inc 5
bindsym --locked XF86MonBrightnessDown exec xbacklight -dec 5
bindsym --locked Mod4+XF86MonBrightnessUp exec xbacklight -inc 10
bindsym --locked Mod4+XF86MonBrightnessDown exec xbacklight -dec 10

# night mode
exec gammastep

# locking
bindswitch lid:toggle exec nu "${HOME}/scripts/sway/sleep.nu"

# keyboard
input type:keyboard {
    xkb_layout "gb"
    xkb_options caps:escape
}

# touchpad
input type:touchpad {
    tap enabled
    natural_scroll enabled
    middle_emulation enabled
}

# audio
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2%
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -2%
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle

# notifications
exec mako

# polkit
exec "${HOME}/scripts/sway/run.nu" soteria

# workspaces
workspace 1 output eDP-1
workspace 2 output eDP-1
workspace 3 output eDP-1
workspace 4 output eDP-1
workspace 5 output eDP-1
workspace 6 output eDP-1
workspace 7 output eDP-1
workspace 8 output eDP-1
workspace 9 output eDP-1
workspace 10 output eDP-1
workspace 11 output DP-2
workspace 12 output DP-2
workspace 13 output DP-2
workspace 14 output DP-2
workspace 15 output DP-2
workspace 16 output DP-2
workspace 17 output DP-2
workspace 18 output DP-2
workspace 19 output DP-2
workspace 20 output DP-2

# workspace switch
bindsym Mod4+1 workspace number 1
bindsym Mod4+2 workspace number 2
bindsym Mod4+3 workspace number 3
bindsym Mod4+4 workspace number 4
bindsym Mod4+5 workspace number 5
bindsym Mod4+6 workspace number 6
bindsym Mod4+7 workspace number 7
bindsym Mod4+8 workspace number 8
bindsym Mod4+9 workspace number 9
bindsym Mod4+0 workspace number 10
bindsym Mod4+Ctrl+1 workspace number 11
bindsym Mod4+Ctrl+2 workspace number 12
bindsym Mod4+Ctrl+3 workspace number 13
bindsym Mod4+Ctrl+4 workspace number 14
bindsym Mod4+Ctrl+5 workspace number 15
bindsym Mod4+Ctrl+6 workspace number 16
bindsym Mod4+Ctrl+7 workspace number 17
bindsym Mod4+Ctrl+8 workspace number 18
bindsym Mod4+Ctrl+9 workspace number 19
bindsym Mod4+Ctrl+0 workspace number 20

# quick workspace switch
bindsym Mod4+ctrl+left workspace prev
bindsym Mod4+ctrl+right workspace next

# workspace move
bindsym Mod4+Shift+1 move container to workspace number 1
bindsym Mod4+Shift+2 move container to workspace number 2
bindsym Mod4+Shift+3 move container to workspace number 3
bindsym Mod4+Shift+4 move container to workspace number 4
bindsym Mod4+Shift+5 move container to workspace number 5
bindsym Mod4+Shift+6 move container to workspace number 6
bindsym Mod4+Shift+7 move container to workspace number 7
bindsym Mod4+Shift+8 move container to workspace number 8
bindsym Mod4+Shift+9 move container to workspace number 9
bindsym Mod4+Shift+0 move container to workspace number 10
bindsym Mod4+Ctrl+Shift+1 move container to workspace number 11
bindsym Mod4+Ctrl+Shift+2 move container to workspace number 12
bindsym Mod4+Ctrl+Shift+3 move container to workspace number 13
bindsym Mod4+Ctrl+Shift+4 move container to workspace number 14
bindsym Mod4+Ctrl+Shift+5 move container to workspace number 15
bindsym Mod4+Ctrl+Shift+6 move container to workspace number 16
bindsym Mod4+Ctrl+Shift+7 move container to workspace number 17
bindsym Mod4+Ctrl+Shift+8 move container to workspace number 18
bindsym Mod4+Ctrl+Shift+9 move container to workspace number 19
bindsym Mod4+Ctrl+Shift+0 move container to workspace number 20

# switch tiling direction
bindsym Mod4+ctrl+h splith
bindsym Mod4+ctrl+v splitv

# switch tiling mode
bindsym Mod4+ctrl+t layout tabbed
bindsym Mod4+ctrl+s layout toggle split
bindsym Mod4+ctrl+f fullscreen

bindsym Mod4+ctrl+Space floating toggle
bindsym Mod4+Shift+Space focus mode_toggle

# reload sway
bindsym Mod4+Shift+r reload

#
# ~~~ windows

# move focus
bindsym Mod4+up focus up
bindsym Mod4+right focus right
bindsym Mod4+down focus down
bindsym Mod4+left focus left

# move window
bindsym Mod4+Shift+up move up
bindsym Mod4+Shift+right move right
bindsym Mod4+Shift+down move down
bindsym Mod4+Shift+left move left

# move floating window
floating_modifier Mod4 normal

#
# ~~~ programs

# close
bindsym Mod4+q kill

# terminal
bindsym Mod4+Return exec kitty

# launcher
bindsym Mod4+Space exec nu "${HOME}/scripts/sway/launcher.nu"

# browser
bindsym Mod4+b exec nu "${HOME}/scripts/sway/run.nu" librewolf

# passwords
exec swaymsg "workspace 10; layout tabbed; exec nu ${HOME}/scripts/sway/run.nu keepassxc; workspace 1"

# screenshots
bindsym Print exec nu -c "grim -g (slurp) ~/pics/screenshots/(date now | format date '%Y-%m-%d %H:%M:%S').png"
bindsym XF86SelectiveScreenshot exec nu -c "grim ~/pics/screenshots/(date now | format date '%Y-%m-%d %H:%M:%S').png"

#
# ~~~ theming

# borders
default_border pixel 2
hide_edge_borders --i3 smart

client.focused #e0e1e4 #e0e1e4 #18191b
client.unfocused #18191b #18191b #e0e1e4

# gaps
gaps inner 4
smart_gaps on

# wallpaper
output * bg ~/.wallpaper.png center

# cursor
seat seat0 xcursor_theme macOS 24

# bar
exec waybar