|
|
@ -0,0 +1,228 @@
|
|
|
1
|
# Default config for sway
|
|
|
2
|
#
|
|
|
3
|
# Copy this to ~/.config/sway/config and edit it to your liking.
|
|
|
4
|
#
|
|
|
5
|
# Read `man 5 sway` for a complete reference.
|
|
|
6
|
|
|
|
7
|
### Variables
|
|
|
8
|
#
|
|
|
9
|
# Logo key. Use Mod1 for Alt.
|
|
|
10
|
set $mod Mod4
|
|
|
11
|
# Home row direction keys, like vim
|
|
|
12
|
set $left h
|
|
|
13
|
set $down j
|
|
|
14
|
set $up k
|
|
|
15
|
set $right l
|
|
|
16
|
# Your preferred terminal emulator
|
|
|
17
|
set $term alacritty -e tmux
|
|
|
18
|
# Your preferred application launcher
|
|
|
19
|
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
|
|
20
|
# on the original workspace that the command was run on.
|
|
|
21
|
set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
|
|
22
|
|
|
|
23
|
### Output configuration
|
|
|
24
|
#
|
|
|
25
|
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
|
|
26
|
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
|
|
27
|
#
|
|
|
28
|
# Example configuration:
|
|
|
29
|
#
|
|
|
30
|
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
|
|
31
|
#
|
|
|
32
|
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
|
|
33
|
output DP-1 res 2560x1440 pos 0,0
|
|
|
34
|
output LVDS-1 disable
|
|
|
35
|
output LVDS-1 dpms off
|
|
|
36
|
|
|
|
37
|
### Idle configuration
|
|
|
38
|
#
|
|
|
39
|
# Example configuration:
|
|
|
40
|
#
|
|
|
41
|
# exec swayidle -w \
|
|
|
42
|
# timeout 300 'swaylock -f -c 000000' \
|
|
|
43
|
# timeout 600 'swaymsg "output * dpms off"' \
|
|
|
44
|
# resume 'swaymsg "output * dpms on"' \
|
|
|
45
|
# before-sleep 'swaylock -f -c 000000'
|
|
|
46
|
#
|
|
|
47
|
# This will lock your screen after 300 seconds of inactivity, then turn off
|
|
|
48
|
# your displays after another 300 seconds, and turn your screens back on when
|
|
|
49
|
# resumed. It will also lock your screen before your computer goes to sleep.
|
|
|
50
|
|
|
|
51
|
### Input configuration
|
|
|
52
|
#
|
|
|
53
|
# Example configuration:
|
|
|
54
|
#
|
|
|
55
|
# input "2:14:SynPS/2_Synaptics_TouchPad" {
|
|
|
56
|
# dwt enabled
|
|
|
57
|
# tap enabled
|
|
|
58
|
# natural_scroll enabled
|
|
|
59
|
# middle_emulation enabled
|
|
|
60
|
# }
|
|
|
61
|
#
|
|
|
62
|
# You can get the names of your inputs by running: swaymsg -t get_inputs
|
|
|
63
|
# Read `man 5 sway-input` for more information about this section.
|
|
|
64
|
input type:keyboard {
|
|
|
65
|
xkb_layout us,de
|
|
|
66
|
#xkb_variant Keyodeadkeys
|
|
|
67
|
xkb_options grp:switch
|
|
|
68
|
}
|
|
|
69
|
|
|
|
70
|
### Key bindings
|
|
|
71
|
#
|
|
|
72
|
# Basics:
|
|
|
73
|
#
|
|
|
74
|
# Start a terminal
|
|
|
75
|
bindsym $mod+Return exec $term
|
|
|
76
|
|
|
|
77
|
# Kill focused window
|
|
|
78
|
bindsym $mod+Shift+c kill
|
|
|
79
|
|
|
|
80
|
# Start your launcher
|
|
|
81
|
bindsym $mod+p exec $menu
|
|
|
82
|
|
|
|
83
|
# Drag floating windows by holding down $mod and left mouse button.
|
|
|
84
|
# Resize them with right mouse button + $mod.
|
|
|
85
|
# Despite the name, also works for non-floating windows.
|
|
|
86
|
# Change normal to inverse to use left mouse button for resizing and right
|
|
|
87
|
# mouse button for dragging.
|
|
|
88
|
floating_modifier $mod normal
|
|
|
89
|
|
|
|
90
|
# Reload the configuration file
|
|
|
91
|
bindsym $mod+q reload
|
|
|
92
|
|
|
|
93
|
# Exit sway (logs you out of your Wayland session)
|
|
|
94
|
bindsym $mod+Shift+q exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
|
|
95
|
|
|
|
96
|
bindsym $mod+Shift+l exec swaylock --color 000000
|
|
|
97
|
#
|
|
|
98
|
# Moving around:
|
|
|
99
|
#
|
|
|
100
|
# Move your focus around
|
|
|
101
|
bindsym $mod+$left focus left
|
|
|
102
|
bindsym $mod+$down focus down
|
|
|
103
|
bindsym $mod+$up focus up
|
|
|
104
|
bindsym $mod+$right focus right
|
|
|
105
|
# Or use $mod+[up|down|left|right]
|
|
|
106
|
bindsym $mod+Left focus left
|
|
|
107
|
bindsym $mod+Down focus down
|
|
|
108
|
bindsym $mod+Up focus up
|
|
|
109
|
bindsym $mod+Right focus right
|
|
|
110
|
|
|
|
111
|
# Move the focused window with the same, but add Shift
|
|
|
112
|
#bindsym $mod+Shift+$left move left
|
|
|
113
|
#bindsym $mod+Shift+$down move down
|
|
|
114
|
#bindsym $mod+Shift+$up move up
|
|
|
115
|
#bindsym $mod+Shift+$right move right
|
|
|
116
|
# Ditto, with arrow keys
|
|
|
117
|
bindsym $mod+Shift+Left move left
|
|
|
118
|
bindsym $mod+Shift+Down move down
|
|
|
119
|
bindsym $mod+Shift+Up move up
|
|
|
120
|
bindsym $mod+Shift+Right move right
|
|
|
121
|
#
|
|
|
122
|
# Workspaces:
|
|
|
123
|
#
|
|
|
124
|
# Switch to workspace
|
|
|
125
|
bindsym $mod+1 workspace 1
|
|
|
126
|
bindsym $mod+2 workspace 2
|
|
|
127
|
bindsym $mod+3 workspace 3
|
|
|
128
|
bindsym $mod+4 workspace 4
|
|
|
129
|
bindsym $mod+5 workspace 5
|
|
|
130
|
bindsym $mod+6 workspace 6
|
|
|
131
|
bindsym $mod+7 workspace 7
|
|
|
132
|
bindsym $mod+8 workspace 8
|
|
|
133
|
bindsym $mod+9 workspace 9
|
|
|
134
|
bindsym $mod+0 workspace 10
|
|
|
135
|
# Move focused container to workspace
|
|
|
136
|
bindsym $mod+Shift+1 move container to workspace 1
|
|
|
137
|
bindsym $mod+Shift+2 move container to workspace 2
|
|
|
138
|
bindsym $mod+Shift+3 move container to workspace 3
|
|
|
139
|
bindsym $mod+Shift+4 move container to workspace 4
|
|
|
140
|
bindsym $mod+Shift+5 move container to workspace 5
|
|
|
141
|
bindsym $mod+Shift+6 move container to workspace 6
|
|
|
142
|
bindsym $mod+Shift+7 move container to workspace 7
|
|
|
143
|
bindsym $mod+Shift+8 move container to workspace 8
|
|
|
144
|
bindsym $mod+Shift+9 move container to workspace 9
|
|
|
145
|
bindsym $mod+Shift+0 move container to workspace 10
|
|
|
146
|
# Note: workspaces can have any name you want, not just numbers.
|
|
|
147
|
# We just use 1-10 as the default.
|
|
|
148
|
#
|
|
|
149
|
# Layout stuff:
|
|
|
150
|
#
|
|
|
151
|
# You can "split" the current object of your focus with
|
|
|
152
|
# $mod+b or $mod+v, for horizontal and vertical splits
|
|
|
153
|
# respectively.
|
|
|
154
|
bindsym $mod+b splith
|
|
|
155
|
bindsym $mod+v splitv
|
|
|
156
|
|
|
|
157
|
# Switch the current container between different layout styles
|
|
|
158
|
bindsym $mod+s layout stacking
|
|
|
159
|
bindsym $mod+w layout tabbed
|
|
|
160
|
bindsym $mod+e layout toggle split
|
|
|
161
|
|
|
|
162
|
# Make the current focus fullscreen
|
|
|
163
|
bindsym $mod+f fullscreen
|
|
|
164
|
|
|
|
165
|
# Toggle the current focus between tiling and floating mode
|
|
|
166
|
bindsym $mod+Shift+space floating toggle
|
|
|
167
|
|
|
|
168
|
# Swap focus between the tiling area and the floating area
|
|
|
169
|
bindsym $mod+space focus mode_toggle
|
|
|
170
|
|
|
|
171
|
# Move focus to the parent container
|
|
|
172
|
bindsym $mod+a focus parent
|
|
|
173
|
#
|
|
|
174
|
# Scratchpad:
|
|
|
175
|
#
|
|
|
176
|
# Sway has a "scratchpad", which is a bag of holding for windows.
|
|
|
177
|
# You can send windows there and get them back later.
|
|
|
178
|
|
|
|
179
|
# Move the currently focused window to the scratchpad
|
|
|
180
|
bindsym $mod+Shift+minus move scratchpad
|
|
|
181
|
|
|
|
182
|
# Show the next scratchpad window or hide the focused scratchpad window.
|
|
|
183
|
# If there are multiple scratchpad windows, this command cycles through them.
|
|
|
184
|
bindsym $mod+minus scratchpad show
|
|
|
185
|
#
|
|
|
186
|
# Resizing containers:
|
|
|
187
|
#
|
|
|
188
|
mode "resize" {
|
|
|
189
|
# left will shrink the containers width
|
|
|
190
|
# right will grow the containers width
|
|
|
191
|
# up will shrink the containers height
|
|
|
192
|
# down will grow the containers height
|
|
|
193
|
bindsym $left resize shrink width 10px
|
|
|
194
|
bindsym $down resize grow height 10px
|
|
|
195
|
bindsym $up resize shrink height 10px
|
|
|
196
|
bindsym $right resize grow width 10px
|
|
|
197
|
|
|
|
198
|
# Ditto, with arrow keys
|
|
|
199
|
bindsym Left resize shrink width 10px
|
|
|
200
|
bindsym Down resize grow height 10px
|
|
|
201
|
bindsym Up resize shrink height 10px
|
|
|
202
|
bindsym Right resize grow width 10px
|
|
|
203
|
|
|
|
204
|
# Return to default mode
|
|
|
205
|
bindsym Return mode "default"
|
|
|
206
|
bindsym Escape mode "default"
|
|
|
207
|
}
|
|
|
208
|
bindsym $mod+r mode "resize"
|
|
|
209
|
|
|
|
210
|
#
|
|
|
211
|
# Status Bar:
|
|
|
212
|
#
|
|
|
213
|
# Read `man 5 sway-bar` for more information about this section.
|
|
|
214
|
bar {
|
|
|
215
|
position top
|
|
|
216
|
|
|
|
217
|
# When the status_command prints a new line to stdout, swaybar updates.
|
|
|
218
|
# The default just shows the current date and time.
|
|
|
219
|
status_command while ~/.config/dwm/status.sh || true; do sleep 15; done
|
|
|
220
|
|
|
|
221
|
colors {
|
|
|
222
|
statusline #ffffff
|
|
|
223
|
background #323232
|
|
|
224
|
inactive_workspace #32323200 #32323200 #5c5c5c
|
|
|
225
|
}
|
|
|
226
|
}
|
|
|
227
|
|
|
|
228
|
include /etc/sway/config.d/*
|