diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/sway.1.scd | 16 | ||||
-rw-r--r-- | sway/sway.1.txt | 109 | ||||
-rw-r--r-- | sway/sway.5.scd | 578 | ||||
-rw-r--r-- | sway/sway.5.txt | 544 |
4 files changed, 586 insertions, 661 deletions
diff --git a/sway/sway.1.scd b/sway/sway.1.scd index 02caa048..5b770cce 100644 --- a/sway/sway.1.scd +++ b/sway/sway.1.scd | |||
@@ -46,14 +46,14 @@ You can run sway directly from a tty, or via a Wayland-compatible login manager. | |||
46 | 46 | ||
47 | sway searches for a config file in the following locations, in this order: | 47 | sway searches for a config file in the following locations, in this order: |
48 | 48 | ||
49 | - ~/.sway/config | 49 | . ~/.sway/config |
50 | - $XDG\_CONFIG\_HOME/sway/config (suggested location) | 50 | . $XDG\_CONFIG\_HOME/sway/config (suggested location) |
51 | - ~/.i3/config | 51 | . ~/.i3/config |
52 | - $XDG\_CONFIG\_HOME/i3/config | 52 | . $XDG\_CONFIG\_HOME/i3/config |
53 | - /etc/sway/config | 53 | . /etc/sway/config |
54 | - /etc/i3/config | 54 | . /etc/i3/config |
55 | 55 | ||
56 | If unset, $XDG\_CONFIG\_HOME defalts to *~/.config*. | 56 | If unset, $XDG\_CONFIG\_HOME defaults to *~/.config*. |
57 | 57 | ||
58 | An error is raised when no config file is found. The recommended default | 58 | An error is raised when no config file is found. The recommended default |
59 | configuration is usually installed to */etc/sway/config*; you are encouraged to | 59 | configuration is usually installed to */etc/sway/config*; you are encouraged to |
diff --git a/sway/sway.1.txt b/sway/sway.1.txt deleted file mode 100644 index 17fc13da..00000000 --- a/sway/sway.1.txt +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | ///// | ||
2 | vim:set ft=asciidoc ts=4 sw=4 tw=82 noet: | ||
3 | ///// | ||
4 | :quotes.~: | ||
5 | |||
6 | sway (1) | ||
7 | ======== | ||
8 | |||
9 | Name | ||
10 | ---- | ||
11 | sway - SirCmpwn's Wayland window manager | ||
12 | |||
13 | Synopsis | ||
14 | -------- | ||
15 | 'sway' [options] [command] | ||
16 | |||
17 | Options | ||
18 | ------- | ||
19 | |||
20 | *-h, --help*:: | ||
21 | Show help message and quit. | ||
22 | |||
23 | *-c, \--config* <config>:: | ||
24 | Specifies a config file. | ||
25 | |||
26 | *-C, \--validate*:: | ||
27 | Check the validity of the config file, then exit. | ||
28 | |||
29 | *-d, --debug*:: | ||
30 | Enables full logging, including debug information. | ||
31 | |||
32 | *-v, \--version*:: | ||
33 | Show the version number and quit. | ||
34 | |||
35 | *-V, --verbose*:: | ||
36 | Enables more verbose logging. | ||
37 | |||
38 | *--get-socketpath*:: | ||
39 | Gets the IPC socket path and prints it, then exits. | ||
40 | |||
41 | Description | ||
42 | ----------- | ||
43 | |||
44 | sway was created to fill the need of an i3-like window manager for Wayland. The | ||
45 | upstream i3 developers have no intention of porting i3 to Wayland, and projects | ||
46 | proposed by others ended up as vaporware. Many thanks to the i3 folks for | ||
47 | providing such a great piece of software, so good that your users would rather | ||
48 | write an entirely new window manager from scratch that behaved _exactly_ like i3 | ||
49 | rather than switch to something else. | ||
50 | |||
51 | Launch sway directly from a tty or via your favorite Wayland-compatible login | ||
52 | manager. | ||
53 | |||
54 | Commands | ||
55 | -------- | ||
56 | |||
57 | If sway is currently running, you may run _sway [command]_ to send _command_ to | ||
58 | the running instance of sway. The same commands you would use in the config file | ||
59 | are valid here (see **sway**(5)). For compatibility reasons, you may also issue | ||
60 | commands with **swaymsg**(1) or **i3-msg**(1) (or even with **i3**(1), probably). | ||
61 | |||
62 | Configuration | ||
63 | ------------- | ||
64 | |||
65 | The path to a config file can be given via the _-c_ parameter, else | ||
66 | sway searches for it in the following locations: | ||
67 | - ~/.sway/config | ||
68 | - $XDG_CONFIG_HOME/sway/config (suggested location) | ||
69 | - ~/.i3/config | ||
70 | - $XDG_CONFIG_HOME/i3/config (XDG_HOME ) | ||
71 | - /etc/sway/config | ||
72 | - /etc/i3/config | ||
73 | |||
74 | In /etc/sway/config the standard config file is installed. | ||
75 | An error is raised when no config file is found. | ||
76 | |||
77 | To write your own configuration, it's suggested that you copy the default config file to | ||
78 | the location of your choosing and start there. | ||
79 | |||
80 | For information on the config file format, see **sway**(5). | ||
81 | |||
82 | Environment | ||
83 | ----------- | ||
84 | |||
85 | The following environment variables have an effect on sway: | ||
86 | |||
87 | *SWAY_CURSOR_THEME*:: | ||
88 | Specifies the name of the cursor theme to use. | ||
89 | |||
90 | *SWAY_CURSOR_SIZE*:: | ||
91 | Specifies the size of the cursor to use. | ||
92 | |||
93 | *SWAYSOCK*:: | ||
94 | Specifies the path to the sway IPC socket. | ||
95 | |||
96 | *XKB_DEFAULT_RULES*, *XKB_DEFAULT_MODEL*, *XKB_DEFAULT_LAYOUT*, *XKB_DEFAULT_VARIANT*, *XKB_DEFAULT_OPTIONS*:: | ||
97 | Configures the xkb keyboard settings. See xkeyboard-config(7). | ||
98 | |||
99 | Authors | ||
100 | ------- | ||
101 | |||
102 | Maintained by Drew DeVault <sir@cmpwn.com>, who is assisted by other open | ||
103 | source contributors. For more information about sway development, see | ||
104 | <https://github.com/swaywm/sway>. | ||
105 | |||
106 | See Also | ||
107 | -------- | ||
108 | |||
109 | **sway**(5) **swaymsg**(1) **swaygrab**(1) **sway-input**(5) **sway-bar**(5) | ||
diff --git a/sway/sway.5.scd b/sway/sway.5.scd new file mode 100644 index 00000000..75f1bf9d --- /dev/null +++ b/sway/sway.5.scd | |||
@@ -0,0 +1,578 @@ | |||
1 | sway(5) | ||
2 | |||
3 | # NAME | ||
4 | |||
5 | sway - configuration file and commands | ||
6 | |||
7 | # DESCRIPTION | ||
8 | |||
9 | A sway configuration file is a list of sway commands that are executed by sway | ||
10 | on startup. These commands usually consist of setting your preferences and | ||
11 | setting key bindings. An example config is likely present in /etc/sway/config | ||
12 | for you to check out. | ||
13 | |||
14 | Lines in the configuration file might be extended through multiple lines by | ||
15 | adding a '\\' character at the end of line. e.g.: | ||
16 | |||
17 | ``` | ||
18 | bindsym Shift+XF86AudioRaiseVolume exec \\ | ||
19 | pactl set-sink-volume @DEFAULT_SINK@ -1% | ||
20 | ``` | ||
21 | |||
22 | These commands can be executed in your config file, via *swaymsg*(1), or via | ||
23 | the bindsym command. | ||
24 | |||
25 | # COMMAND CONVENTIONS | ||
26 | |||
27 | Commands are split into several arguments using spaces. You can enclose | ||
28 | arguments with quotation marks (*"..."* or *'...'*) to add spaces to a single | ||
29 | argument. You may also run several commands in order by separating each with | ||
30 | *,* or *;*. | ||
31 | |||
32 | Throughout the documentation, *|* is used to distinguish between arguments for | ||
33 | which you may only select one. *[...]* is used for optional arguments, and | ||
34 | *<...>* for arguments where you are expected to supply some value. | ||
35 | |||
36 | # COMMANDS | ||
37 | |||
38 | The following commands may only be used in the configuration file. | ||
39 | |||
40 | *bar {* <commands...> *}* | ||
41 | _commands..._ after *{* will be interpreted as bar commands. For | ||
42 | details, see *sway-bar*(5). A newline is required between *{* and the | ||
43 | first command, and *}* must be alone on a line. | ||
44 | |||
45 | *default\_orientation* horizontal|vertical|auto | ||
46 | Sets the default container layout for tiled containers. | ||
47 | |||
48 | *include* <path> | ||
49 | Includes another file from _path_. _path_ can be either a full path or a | ||
50 | path relative to the parent config, and expands shell syntax (see | ||
51 | *wordexp*(3) for details). The same include file can only be included once; | ||
52 | subsequent attempts will be ignored. | ||
53 | |||
54 | *set* <name> <value> | ||
55 | Sets variable $_name_ to _value_. You can use the new variable in the | ||
56 | arguments of future commands. | ||
57 | |||
58 | *swaybg\_command* <command> | ||
59 | Executes custom bg _command_. Default is _swaybg_. Refer to **output** | ||
60 | below for more information. | ||
61 | |||
62 | The following commands cannot be used directly in the configuration file. | ||
63 | They are expected to be used with *bindsym* or at runtime through *swaymsg*(1). | ||
64 | |||
65 | *border* normal|pixel [<n>] | ||
66 | Set border style for focused window. _normal_ includes a border of | ||
67 | thickness _n_ and a title bar. _pixel_ is a border without title bar _n_ | ||
68 | pixels thick. Default is _normal_ with border thickness 2. | ||
69 | |||
70 | *border* none|toggle | ||
71 | Set border style for focused window to _none_ or _toggle_ between the | ||
72 | available border styles: _normal_, _pixel_, _none_. | ||
73 | |||
74 | *exit* | ||
75 | Exit sway and end your Wayland session. | ||
76 | |||
77 | *floating* enable|disable|toggle | ||
78 | Make focused view floating, non-floating, or the opposite of what it is now. | ||
79 | |||
80 | *focus* up|right|down|left | ||
81 | Moves focus to the next container in the specified direction. | ||
82 | |||
83 | *focus* child | ||
84 | Moves focus to the last-focused child of the focused container. | ||
85 | |||
86 | *focus* parent | ||
87 | Moves focus to the parent of the focused container. | ||
88 | |||
89 | *focus* output up|right|down|left | ||
90 | Moves focus to the next output in the specified direction. | ||
91 | |||
92 | *focus* output <name> | ||
93 | Moves focus to the named output. | ||
94 | |||
95 | *focus* mode\_toggle | ||
96 | Moves focus between the floating and tiled layers. | ||
97 | |||
98 | *fullscreen* | ||
99 | Toggles fullscreen for the focused view. | ||
100 | |||
101 | *layout* splith|splitv|stacking|tabbed | ||
102 | Sets the layout mode of the focused container. | ||
103 | |||
104 | *layout* toggle split | ||
105 | Switches the focused container between the splitv and splith layouts. | ||
106 | |||
107 | *move* left|right|up|down [<px>] | ||
108 | Moves the focused container in the direction specified. If the container, | ||
109 | the optional _px_ argument specifies how many pixels to move the container. | ||
110 | If unspecified, the default is 10 pixels. Pixels are ignored when moving | ||
111 | tiled containers. | ||
112 | |||
113 | *move* container|window to workspace <name> | ||
114 | Moves the focused container to the specified workspace. | ||
115 | |||
116 | *move* container|window to workspace prev|next | ||
117 | Moves the focused container to the previous or next workspace on this | ||
118 | output, or if no workspaces remain, the previous or next output. | ||
119 | |||
120 | *move* container|window to workspace prev\_on\_output|next\_on\_output | ||
121 | Moves the focused container to the previous or next workspace on this | ||
122 | output, wrapping around if already at the first or last workspace. | ||
123 | |||
124 | *move* container|window|workspace to output <name> | ||
125 | Moves the focused container or workspace to the specified output. | ||
126 | |||
127 | *move* container|window|workspace to output up|right|down|left | ||
128 | Moves the focused container or workspace to next output in the specified | ||
129 | direction. | ||
130 | |||
131 | *move* [to] scratchpad | ||
132 | Moves the focused window to the scratchpad. | ||
133 | |||
134 | *reload* | ||
135 | Reloads the sway config file and applies any changes. | ||
136 | |||
137 | *resize* shrink|grow width|height [<amount>] [px|ppt] | ||
138 | Resizes the currently focused container by _amount_, specified in pixels or | ||
139 | percentage points. If omitted, floating containers are resized in px and | ||
140 | tiled containers by ppt. If omitted, the default _amount_ is 10. | ||
141 | |||
142 | *resize set* <width> [px] <height> [px] | ||
143 | Sets the width and height of the currently focused container to _width_ | ||
144 | pixels and _height_ pixels. The [px] parameters are optional and have no | ||
145 | effect. This command only accepts a size in pixels. Width and height may be | ||
146 | specified in either order. | ||
147 | |||
148 | *scratchpad show* | ||
149 | Shows a window from the scratchpad. Repeatedly using this command will | ||
150 | cycle through the windows in the scratchpad. | ||
151 | |||
152 | *split* vertical|v|horizontal|h|toggle|t | ||
153 | Splits the current container, vertically or horizontally. When _toggle_ is | ||
154 | specified, the current container is split opposite to the parent | ||
155 | container's layout. | ||
156 | |||
157 | *splith* | ||
158 | Equivalent to *split horizontal* | ||
159 | |||
160 | *splitv* | ||
161 | Equivalent to *split vertical* | ||
162 | |||
163 | *splitt* | ||
164 | Equivalent to *split toggle* | ||
165 | |||
166 | *sticky* enable|disable|toggle | ||
167 | "Sticks" a floating window to the current output so that it shows up on all | ||
168 | workspaces. | ||
169 | |||
170 | The following commands may be used either in the configuration file or at | ||
171 | runtime. | ||
172 | |||
173 | *assign* <criteria> [→] <workspace> | ||
174 | Assigns views matching _criteria_ (see *CRITERIA* for details) to | ||
175 | _workspace_. The → (U+2192) is optional and cosmetic. This command is | ||
176 | equivalent to: | ||
177 | |||
178 | for\_window <criteria> move container to workspace <workspace> | ||
179 | |||
180 | *bindsym* <key combo> <command> | ||
181 | Binds _key combo_ to execute the sway command _command_ when pressed. You | ||
182 | may use XKB key names here (*xev*(1) is a good tool for discovering these). | ||
183 | |||
184 | Example: | ||
185 | |||
186 | # Execute firefox when alt, shift, and f are pressed together | ||
187 | bindsym Mod1+Shift+f exec firefox | ||
188 | |||
189 | *bindcode* <code> <command> is also available for binding with key codes | ||
190 | instead of key names. | ||
191 | |||
192 | *client.<class>* <border> <background> <text> <indicator> <child\_border> | ||
193 | Configures the color of window borders and title bars. All 5 colors are | ||
194 | required, with the exception of *client.background*, which requires exactly | ||
195 | one. Colors may be specified in hex, either as _#RRGGBB_ or _#RRGGBBAA_. | ||
196 | |||
197 | The available classes are: | ||
198 | |||
199 | *client.background* | ||
200 | Ignored (present for i3 compatability). | ||
201 | |||
202 | *client.focused* | ||
203 | The window that has focus. | ||
204 | |||
205 | *client.focused\_inactive* | ||
206 | The most recently focused view within a container which is not focused. | ||
207 | |||
208 | *client.placeholder* | ||
209 | Ignored (present for i3 compatability). | ||
210 | |||
211 | *client.unfocused* | ||
212 | A view that does not have focus. | ||
213 | |||
214 | *client.urgent* | ||
215 | A view with an urgency hint. *Note*: This is not currently implemented. | ||
216 | |||
217 | The meaning of each color is: | ||
218 | |||
219 | _border_ | ||
220 | The border around the title bar. | ||
221 | |||
222 | _background_ | ||
223 | The background of the title bar. | ||
224 | |||
225 | _text_ | ||
226 | The text color of the title bar. | ||
227 | |||
228 | _indicator_ | ||
229 | The color used to indicate where a new view will open. In a tiled | ||
230 | container, this would paint the right border of the current view if a | ||
231 | new view would be opened to the right. | ||
232 | |||
233 | _child\_border_ | ||
234 | The border around the view itself. | ||
235 | |||
236 | The default colors are: | ||
237 | |||
238 | [- *class* | ||
239 | :[ _border_ | ||
240 | :[ _background_ | ||
241 | :[ _text_ | ||
242 | :[ _indicator_ | ||
243 | :[ _child\_border_ | ||
244 | |[ *background* | ||
245 | : n/a | ||
246 | : #ffffff | ||
247 | : n/a | ||
248 | : n/a | ||
249 | : n/a | ||
250 | | *focused* | ||
251 | : #4c7899 | ||
252 | : #285577 | ||
253 | : #ffffff | ||
254 | : #2e9ef4 | ||
255 | : #285577 | ||
256 | | *focused\_inactive* | ||
257 | : #333333 | ||
258 | : #5f676a | ||
259 | : #ffffff | ||
260 | : #484e50 | ||
261 | : #5f676a | ||
262 | | *unfocused* | ||
263 | : #333333 | ||
264 | : #222222 | ||
265 | : #888888 | ||
266 | : #292d2e | ||
267 | : #222222 | ||
268 | | *urgent* | ||
269 | : #2f343a | ||
270 | : #900000 | ||
271 | : #ffffff | ||
272 | : #900000 | ||
273 | : #900000 | ||
274 | | *placeholder* | ||
275 | : #000000 | ||
276 | : #0c0c0c | ||
277 | : #ffffff | ||
278 | : #000000 | ||
279 | : #0c0c0c | ||
280 | |||
281 | *debuglog* on|off|toggle | ||
282 | Enables, disables or toggles debug logging. _toggle_ cannot be used in the | ||
283 | configuration file. | ||
284 | |||
285 | *default\_border* normal|none|pixel [<n>] | ||
286 | Set default border style for new tiled windows. | ||
287 | |||
288 | *default\_floating\_border* normal|none|pixel [<n>] | ||
289 | Set default border style for new floating windows. This only applies to | ||
290 | windows that are spawned in floating mode, not windows that become floating | ||
291 | afterwards. | ||
292 | |||
293 | *exec* <shell command> | ||
294 | Executes _shell command_ with sh. | ||
295 | |||
296 | *exec\_always* <shell command> | ||
297 | Like exec, but the shell command will be executed _again_ after *reload*. | ||
298 | |||
299 | *floating\_maximum\_size* <width> x <height> | ||
300 | Specifies the maximum size of floating windows. -1 x -1 removes the upper | ||
301 | limit. | ||
302 | |||
303 | *floating\_minimum\_size* <width> x <height> | ||
304 | Specifies the minimum size of floating windows. The default is 75 x 50. | ||
305 | |||
306 | *floating\_modifier* <modifier> [normal|inverse] | ||
307 | When the _modifier_ key is held down, you may hold left click to move | ||
308 | windows, and right click to resize them. If _inverse_ is specified, left | ||
309 | click is used for resizing and right click for moving. | ||
310 | |||
311 | *floating\_scroll* up|right|down|left [command] | ||
312 | Sets a command to be executed when the mouse wheel is scrolled in the | ||
313 | specified direction while holding the floating modifier. Resets the | ||
314 | command, when given no arguments. | ||
315 | |||
316 | *focus\_follows\_mouse* yes|no | ||
317 | If set to _yes_, moving your mouse over a window will focus that window. | ||
318 | |||
319 | *font* <font> | ||
320 | Sets font for use in title bars in Pango format. | ||
321 | |||
322 | *for\_window* <criteria> <command> | ||
323 | Whenever a window that matches _criteria_ appears, run list of commands. | ||
324 | See *CRITERIA* for more details. | ||
325 | |||
326 | *gaps* edge\_gaps on|off|toggle | ||
327 | When _on_, gaps will be added between windows and workspace edges if the | ||
328 | inner gap is nonzero. When _off_, gaps will only be added between views. | ||
329 | _toggle_ cannot be used in the configuration file. | ||
330 | |||
331 | *gaps* <amount> | ||
332 | Sets _amount_ pixels of gap between windows and around each workspace. | ||
333 | |||
334 | *gaps* inner|outer <amount> | ||
335 | Sets default _amount_ pixels of _inner_ or _outer_ gap, where the former | ||
336 | affects spacing between views and the latter affects the space around each | ||
337 | workspace. | ||
338 | |||
339 | *gaps* inner|outer all|workspace|current set|plus|minus <amount> | ||
340 | Changes the gaps for the _inner_ or _outer_ gap. _all_ changes the gaps for | ||
341 | all views or workspace, _workspace_ changes gaps for all views in current | ||
342 | workspace (or current workspace), and _current_ changes gaps for the current | ||
343 | view or workspace. | ||
344 | |||
345 | *hide\_edge\_borders* none|vertical|horizontal|both|smart | ||
346 | Hides window borders adjacent to the screen edges. Default is _none_. | ||
347 | |||
348 | *input* <input\_device> *{* <commands...> *}* | ||
349 | _commands..._ after *{* will be interpreted as input commands applying to | ||
350 | the specified input device. For details, see *sway-input*(5). A newline is | ||
351 | required between *{* and the first command, and *}* must be alone on a | ||
352 | line. | ||
353 | |||
354 | \* may be used in lieu of a specific device name to configure all input | ||
355 | devices. A list of input device names may be obtained via *swaymsg -t | ||
356 | get\_inputs*. | ||
357 | |||
358 | *seat* <seat> *{* <commands...> *}* | ||
359 | _commands..._ after *{* will be interpreted as seat commands applying to | ||
360 | the specified seat. For details, see *sway-input*(5). A newline is required | ||
361 | between *{* and the first command, and *}* must be alone on a line. | ||
362 | |||
363 | *seat* <seat> cursor move|set <x> <y> | ||
364 | Move specified seat's cursor relative to current position or wrap to | ||
365 | absolute coordinates (with respect to the global coordinate space). | ||
366 | Specifying either value as 0 will not update that coordinate. | ||
367 | |||
368 | *seat* <seat> cursor press|release left|right|1|2|3... | ||
369 | Simulate pressing (or releasing) the specified mouse button on the | ||
370 | specified seat. | ||
371 | |||
372 | *kill* | ||
373 | Kills (closes) the currently focused container and all of its children. | ||
374 | |||
375 | *smart\_gaps* on|off | ||
376 | If smart\_gaps are _on_ gaps will only be enabled if a workspace has more | ||
377 | than one child. | ||
378 | |||
379 | *mark* --add|--replace [--toggle] <identifier> | ||
380 | Marks are arbitrary labels that can be used to identify certain windows and | ||
381 | then jump to them at a later time. By default, *mark* sets _identifier_ as | ||
382 | the only mark on a window. _--add_ will instead add _identifier_ to the | ||
383 | list of current marks. If _--toggle_ is specified mark will remove | ||
384 | _identifier_ if it is already marked. | ||
385 | |||
386 | *mode* <mode> | ||
387 | Switches to the specified mode. The default mode _default_. | ||
388 | |||
389 | *mode* <mode> *{* <commands...> *}* | ||
390 | _commands..._ after *{* will be added to the specified mode. A newline is | ||
391 | required between *{* and the first command, and *}* must be alone on a | ||
392 | line. Only *bindsym* and *bindcode* commands are permitted in mode blocks. | ||
393 | |||
394 | *mouse\_warping* output|none | ||
395 | If _output_ is specified, the mouse will be moved to new outputs as you | ||
396 | move focus between them. | ||
397 | |||
398 | *no\_focus* <criteria> | ||
399 | Prevents windows matching <criteria> from being focused automatically when | ||
400 | they're created. This has no effect on the first window in a workspace. | ||
401 | |||
402 | *output* <name> mode|resolution|res <WIDTHxHEIGHT>[@<RATE>[Hz]] | ||
403 | Configures the specified output to use the given mode. Modes are a | ||
404 | combination of width and height (in pixels) and a refresh rate that your | ||
405 | display can be configured to use. For a list of available modes for each | ||
406 | output, use *swaymsg -t get\_outputs*. | ||
407 | |||
408 | Examples: | ||
409 | |||
410 | output HDMI-A-1 mode 1920x1080 | ||
411 | |||
412 | output HDMI-A-1 mode 1920x1080@60Hz | ||
413 | |||
414 | *output* <name> position|pos <X,Y> | ||
415 | Places the specified output at the specific position in the global | ||
416 | coordinate space. | ||
417 | |||
418 | *output* <name> scale <factor> | ||
419 | Scales the specified output by the specified scale _factor_. An integer is | ||
420 | recommended, but fractional values are also supported. If a fractional | ||
421 | value are specified, be warned that it is not possible to faithfully | ||
422 | represent the contents of your windows - they will be rendered at the next | ||
423 | highest integral scale factor and downscaled. You may be better served by | ||
424 | setting an integral scale factor and adjusting the font size of your | ||
425 | applications to taste. | ||
426 | |||
427 | *output* <name> background|bg <file> <mode> | ||
428 | Sets the wallpaper for the given output to the specified file, using the | ||
429 | given scaling mode (one of "stretch", "fill", "fit", "center", "tile"). | ||
430 | |||
431 | **output** <name> background|bg <color> solid\_color | ||
432 | Sets the background of the given output to the specified color. _color_ | ||
433 | should be specified as _#RRGGBB_. Alpha is not supported. | ||
434 | |||
435 | **output** <name> transform <transform> | ||
436 | Sets the background transform to the given value. Can be one of "90", "180", | ||
437 | "270" for rotation; or "flipped", "flipped-90", "flipped-180", "flipped-270" | ||
438 | to apply a rotation and flip, or "normal" to apply no transform. | ||
439 | |||
440 | *output* <name> disable|enable | ||
441 | Enables or disables the specified output (all outputs are enabled by | ||
442 | default). | ||
443 | |||
444 | *NOTES FOR THE OUTPUT COMMANDS* | ||
445 | |||
446 | You may combine output commands into one, like so: | ||
447 | |||
448 | output HDMI-A-1 mode 1920x1080 pos 1920,0 bg ~/wallpaper.png stretch | ||
449 | |||
450 | You can get a list of output names with *swaymsg -t get\_outputs*. You may also | ||
451 | match any output by using the output name "\*". Be sure to add this output | ||
452 | config after the others, or it will be matched instead of the others. | ||
453 | |||
454 | *show\_marks* on|off | ||
455 | If *show\_marks* is on, marks will be displayed in the window borders. | ||
456 | Any mark that starts with an underscore will not be drawn even if the | ||
457 | option is on. The default is _on_. | ||
458 | |||
459 | *opacity* <value> | ||
460 | Set the opacity of the window between 0 (completely transparent) and 1 | ||
461 | (completely opaque). | ||
462 | |||
463 | *unmark* [<identifier>] | ||
464 | *unmark* will remove _identifier_ from the list of current marks on a | ||
465 | window. If _identifier_ is omitted, all marks are removed. | ||
466 | |||
467 | *workspace* [number] <name> | ||
468 | Switches to the specified workspace. The string "number" is optional and is | ||
469 | used to sort workspaces. | ||
470 | |||
471 | *workspace* prev|next | ||
472 | Switches to the next workspace on the current output or on the next output | ||
473 | if currently on the last workspace. | ||
474 | |||
475 | *workspace* prev\_on\_output|next\_on\_output | ||
476 | Switches to the next workspace on the current output. | ||
477 | |||
478 | *workspace* <name> output <output> | ||
479 | Specifies that workspace _name_ should be shown on the specified _output_. | ||
480 | |||
481 | *workspace\_auto\_back\_and\_forth* yes|no | ||
482 | When _yes_, repeating a workspace switch command will switch back to the | ||
483 | prior workspace. For example, if you are currently on workspace 1, | ||
484 | switch to workspace 2, then invoke the "workspace 2" command again, you | ||
485 | will be returned to workspace 1. Default is _no_. | ||
486 | |||
487 | *workspace\_layout* default|stacking|tabbed | ||
488 | Specifies the initial layout for new workspaces. | ||
489 | |||
490 | # CRITERIA | ||
491 | |||
492 | A criteria is a string in the form of, for example: | ||
493 | |||
494 | ``` | ||
495 | [class="[Rr]egex.*" title="some title"] | ||
496 | ``` | ||
497 | |||
498 | The string contains one or more (space separated) attribute/value pairs. They | ||
499 | are used by some commands to choose which views to execute actions on. All | ||
500 | attributes must match for the criteria to match. | ||
501 | |||
502 | Criteria may be used with either the *for\_window* or *assign* commands to | ||
503 | specify operations to perform on new views. A criteria may also be used to | ||
504 | perform specific commands (ones that normally act upon one window) on all views | ||
505 | that match that criteria. For example: | ||
506 | |||
507 | Focus on a window with the mark "IRC": | ||
508 | |||
509 | ``` | ||
510 | [con_mark="IRC"] focus | ||
511 | ``` | ||
512 | |||
513 | Kill all windows with the title "Emacs": | ||
514 | |||
515 | ``` | ||
516 | [class="Emacs"] kill | ||
517 | ``` | ||
518 | |||
519 | Mark all Firefox windows with "Browser": | ||
520 | |||
521 | ``` | ||
522 | [class="Firefox"] mark Browser | ||
523 | ``` | ||
524 | |||
525 | The following attributes may be matched with: | ||
526 | |||
527 | *app\_id* | ||
528 | Compare value against the app id. Can be a regular expression. If value is | ||
529 | \_\_focused\_\_, then the app id must be the same as that of the currently | ||
530 | focused window. | ||
531 | |||
532 | *class* | ||
533 | Compare value against the window class. Can be a regular expression. If | ||
534 | value is \_\_focused\_\_, then the window class must be the same as that of | ||
535 | the currently focused window. | ||
536 | |||
537 | *con\_id* | ||
538 | Compare against the internal container ID, which you can find via IPC. | ||
539 | |||
540 | *con\_mark* | ||
541 | Compare against the window marks. Can be a regular expression. | ||
542 | |||
543 | *floating* | ||
544 | Matches floating windows. | ||
545 | |||
546 | *id* | ||
547 | Compare value against the X11 window ID. Must be numeric. | ||
548 | |||
549 | *instance* | ||
550 | Compare value against the window instance. Can be a regular expression. If | ||
551 | value is \_\_focused\_\_, then the window instance must be the same as that | ||
552 | of the currently focused window. | ||
553 | |||
554 | *tiling* | ||
555 | Matches tiling windows. | ||
556 | |||
557 | *title* | ||
558 | Compare against the window title. Can be a regular expression. If value is | ||
559 | \_\_focused\_\_, then the window title must be the same as that of the | ||
560 | currently focused window. | ||
561 | |||
562 | *urgent* | ||
563 | Compares the urgent state of the window. Can be "latest" or "oldest". | ||
564 | |||
565 | *window\_role* | ||
566 | Compare against the window role (WM\_WINDOW\_ROLE). Can be a regular | ||
567 | expression. If value is \_\_focused\_\_, then the window role must be the | ||
568 | same as that of the currently focused window. | ||
569 | |||
570 | *window\_type* | ||
571 | Compare against the window type (\_NET\_WM\_WINDOW\_TYPE). Possible values | ||
572 | are normal, dialog, utility, toolbar, splash, menu, dropdown\_menu, | ||
573 | popup\_menu, tooltip and notification. | ||
574 | |||
575 | *workspace* | ||
576 | Compare against the workspace name for this view. Can be a regular | ||
577 | expression. If the value is \_\_focused\_\_, then all the views on the | ||
578 | currently focused workspace matches. | ||
diff --git a/sway/sway.5.txt b/sway/sway.5.txt deleted file mode 100644 index 704bb699..00000000 --- a/sway/sway.5.txt +++ /dev/null | |||
@@ -1,544 +0,0 @@ | |||
1 | ///// | ||
2 | vim:set ts=4 sw=4 tw=82 noet: | ||
3 | ///// | ||
4 | sway (5) | ||
5 | ======== | ||
6 | |||
7 | Name | ||
8 | ---- | ||
9 | sway - configuration file and commands | ||
10 | |||
11 | Description | ||
12 | ----------- | ||
13 | |||
14 | A sway configuration file is a list of sway commands that are executed by sway | ||
15 | on startup. These commands usually consist of setting your preferences and | ||
16 | setting key bindings. An example config is likely present in /etc/sway/config | ||
17 | for you to check out. | ||
18 | |||
19 | Lines in the configuration file might be extended through multiple lines by | ||
20 | adding a '\' character at the end of line. e.g.: | ||
21 | |||
22 | bindsym Shift+XF86AudioRaiseVolume exec pactl set-sink-volume \ | ||
23 | $(pactl list sinks | grep -B 1 RUNNING | sed '1q;d' | sed 's/[^0-9]\+//g') +5% | ||
24 | |||
25 | These commands can be executed in your config file, via **swaymsg**(1), or via | ||
26 | the bindsym command. | ||
27 | |||
28 | Commands | ||
29 | -------- | ||
30 | |||
31 | The following commands may only be used in the configuration file. | ||
32 | |||
33 | **bar** <block of commands>:: | ||
34 | Append _{_ to this command, the following lines will be commands that | ||
35 | configure **swaybar**, and _}_ on its own line to close the block. | ||
36 | + | ||
37 | See **sway-bar**(5) for details. | ||
38 | |||
39 | **default_orientation** <horizontal|vertical|auto>:: | ||
40 | Sets the default container layout for tiled containers. | ||
41 | |||
42 | **set** <name> <value>:: | ||
43 | Sets variable $name to _value_. You can use the new variable in the arguments | ||
44 | of future commands. | ||
45 | |||
46 | **swaybg_command** <command>:: | ||
47 | Executes custom bg command, default is _swaybg_. | ||
48 | |||
49 | The following commands cannot be used directly in the configuration file. | ||
50 | They are expected to be used with **bindsym** or at runtime through **swaymsg**(1). | ||
51 | |||
52 | **border** <normal|pixel> [<n>]:: | ||
53 | Set border style for focused window. _normal_ includes a border of thickness | ||
54 | _n_ and a title bar. _pixel_ is a border without title bar _n_ pixels thick. | ||
55 | Default is _normal_ with border thickness 2. | ||
56 | |||
57 | **border** <none|toggle>:: | ||
58 | Set border style for focused window to _none_ or _toggle_ between the | ||
59 | available border styles: _normal_, _pixel_, _none_. | ||
60 | |||
61 | **exit**:: | ||
62 | Exit sway and end your Wayland session. | ||
63 | |||
64 | **floating** <enable|disable|toggle>:: | ||
65 | Make focused view floating, non-floating, or the opposite of what it is now. | ||
66 | |||
67 | **focus** <direction>:: | ||
68 | Direction may be one of _up_, _down_, _left_, _right_, _next_, _prev_, | ||
69 | _parent_, or _child_. The directional focus commands will move the focus | ||
70 | in that direction. The _next_ and _prev_ directions will focus the next, | ||
71 | respectively previous, element in the current container. The parent | ||
72 | focus command will change the focus to the parent of the currently | ||
73 | focused container, which is useful, for example, to open a sibling of | ||
74 | the parent container, or to move the entire container around. | ||
75 | |||
76 | **focus** output <direction|name>:: | ||
77 | Direction may be one of _up_, _down_, _left_, _right_. The directional focus | ||
78 | commands will move the focus to the output in that direction. When name is | ||
79 | given, the focus is changed to the output with that name. | ||
80 | |||
81 | **focus** mode_toggle:: | ||
82 | Toggles focus between floating view and tiled view. | ||
83 | |||
84 | **fullscreen**:: | ||
85 | Toggles fullscreen status for the focused view. | ||
86 | |||
87 | **layout** <mode>:: | ||
88 | Sets the layout mode of the focused container. _mode_ can be one of _splith_, | ||
89 | _splitv_, _toggle split_, _stacking_, _tabbed_. | ||
90 | |||
91 | **layout** auto <mode>:: | ||
92 | Sets layout to one of the auto modes, i.e. one of _left_, _right_, _top_, | ||
93 | or _bottom_. | ||
94 | |||
95 | **layout** auto <next|prev>:: | ||
96 | Cycles between available auto layouts. | ||
97 | |||
98 | **layout** auto [master|ncol] [inc|set] <n>:: | ||
99 | Modify the number of master elements, respectively slave columns, in the | ||
100 | focused container. <n> can be a positive or negative integer. These commands | ||
101 | only have an effect if the focused container uses one of the "auto" layouts. | ||
102 | |||
103 | **layout** toggle split:: | ||
104 | Cycles between available split layouts. | ||
105 | |||
106 | **move** <left|right|up|down> <[px]>:: | ||
107 | Moves the focused container _left_, _right_, _up_, or _down_. If the window | ||
108 | is floating it moves it _px_ in that direction, defaulting to 10. Tiled | ||
109 | containers are moved the same regardless of the _px_ argument. | ||
110 | |||
111 | **move** <next|prev|first>:: | ||
112 | Moving to _prev_ or _next_ swaps the container with its sibling in the same | ||
113 | container. Move _first_ exchanges the focused element in an auto layout with | ||
114 | the first element, i.e. promotes the focused element to master position. | ||
115 | |||
116 | **move** <container|window> to workspace <name>:: | ||
117 | Moves the focused container to the workspace identified by _name_. | ||
118 | _name_ may be a special workspace name. See **workspace**. | ||
119 | |||
120 | **move** <container|window|workspace> to output <name|direction>:: | ||
121 | Moves the focused container or workspace to the output identified by _name_ or | ||
122 | _direction_. _direction_ may be one of _up_, _down_, _left_, _right_. | ||
123 | |||
124 | **move** [to] scratchpad:: | ||
125 | Moves the focused window to the scratchpad. | ||
126 | |||
127 | **reload**:: | ||
128 | Reloads the sway config file without restarting sway. | ||
129 | |||
130 | **resize** <shrink|grow> <width|height> [<amount>] [px|ppt]:: | ||
131 | Resizes the currently focused container or view by _amount_. _amount_ is | ||
132 | optional: the default value is 10 (either px or ppt depending on the view type). | ||
133 | The [px|ppt] parameter is optional. _px_ specifies that _amount_ refers to pixels; | ||
134 | _ppt_ specifies that _amount_ refers to percentage points of the current | ||
135 | size. Floating views use px by default (but can use ppt if specified); tiled | ||
136 | views use ppt by default (but can use px if specified). | ||
137 | |||
138 | **resize set** <width> [px] <height> [px]:: | ||
139 | Sets the width and height of the currently focused container to _width_ pixels | ||
140 | and _height_ pixels. The [px] parameters are optional and have no effect. This | ||
141 | command only accepts a size in pixels. | ||
142 | |||
143 | **resize set** <width|height> <amount> [px] [<width|height> <amount> [px]]:: | ||
144 | Sets the _width_ and/or _height_ of the currently focused container to | ||
145 | _amount_. The [px] parameters are optional and have no effect. This command | ||
146 | only accepts a size in pixels. | ||
147 | |||
148 | **scratchpad show**:: | ||
149 | Shows a window from the scratchpad. Repeatedly using this command will cycle | ||
150 | through the windows in the scratchpad. | ||
151 | |||
152 | **split** <vertical|v|horizontal|h|toggle|t>:: | ||
153 | Splits the current container, vertically or horizontally. If toggled, then the | ||
154 | current container is split opposite to the parent container. | ||
155 | |||
156 | **splith**:: | ||
157 | Equivalent to **split horizontal**. | ||
158 | |||
159 | **splitv**:: | ||
160 | Equivalent to **split vertical**. | ||
161 | |||
162 | **splitt**:: | ||
163 | Equivalent to **split toggle**. | ||
164 | |||
165 | **sticky** <enable|disable|toggle>:: | ||
166 | "Sticks" a floating window to the current output so that it shows up on all | ||
167 | workspaces. | ||
168 | |||
169 | The following commands may be used either in the configuration file | ||
170 | or triggered at runtime. | ||
171 | |||
172 | **assign** <criteria> [→] <workspace>:: | ||
173 | Assigns views matching _criteria_ (see **Criteria** section below) to | ||
174 | _workspace_. The → (U+2192) is optional and purely for aesthetics. This | ||
175 | command is exactly equivalent to "for_window <criteria> move container to | ||
176 | workspace <workspace>". | ||
177 | |||
178 | **bindsym** <key combo> <command>:: | ||
179 | Binds _key combo_ to execute _command_ when pressed. You may use XKB key | ||
180 | names here (**xev**(1) is a good tool for discovering them). An example | ||
181 | bindsym command would be **bindsym Mod1+Shift+f exec firefox**, which would | ||
182 | execute Firefox if the alt, shift, and F keys are pressed together. Any | ||
183 | valid sway command is eligible to be bound to a key combo. | ||
184 | + | ||
185 | **bindcode** <code> <command> is also available for binding with key codes | ||
186 | instead of key names. | ||
187 | |||
188 | **client**.<color_class> <border> <background> <text> <indicator> <child_border>:: | ||
189 | The client commands control the colors of the view borders and title bars. All | ||
190 | client commands _require_ five color values. (The one exception is | ||
191 | **client.background** which _requires_ one color value.) If you only want to | ||
192 | specify a subset, supply default colors for all the others. Colors must be | ||
193 | defined in hex. i.e. _#rrggbb_ or _#rrggbbaa_, when including the alpha | ||
194 | channel. | ||
195 | + | ||
196 | The command tokens are: | ||
197 | **color_class**::: Specifies the view to which the colors apply. | ||
198 | **client.background**:::: The color a view will be painted, underneath the | ||
199 | client itself. This will only be visible if a client does not fully | ||
200 | cover its allocated view space. This command only requires one color. _Note_: | ||
201 | This is not currently implemented. | ||
202 | **client.focused**:::: The view that has focus. | ||
203 | **client.focused_inactive**:::: A view that has focus within its | ||
204 | container, but the container is not focused. | ||
205 | **client.placeholder**:::: Used when drawing placeholder view contents. | ||
206 | Only background and text colors are used. _Note_: This is not | ||
207 | currently implemented. | ||
208 | **client.unfocused**:::: A view that does not have focus. | ||
209 | **client.urgent**:::: A view with an urgency hint. _Note_: This is not | ||
210 | currently implemented. | ||
211 | **border**::: The border around the title bar. | ||
212 | **background**::: The background of the title bar. | ||
213 | **text**::: The text color of the title bar. | ||
214 | **indicator**::: The color used to indicate where a new view will open. In a | ||
215 | tiled container, this would paint the right border of the current view if | ||
216 | a new view would be opened to the right. | ||
217 | **child_border**::: The border around the view itself. | ||
218 | |||
219 | + | ||
220 | The default colors are: | ||
221 | + | ||
222 | -- | ||
223 | [options="header"] | ||
224 | |=========================================================================== | ||
225 | |color_class |border |background |text |indicator |child_border | ||
226 | |background |n/a |#ffffff |n/a |n/a |n/a | ||
227 | |focused |#4c7899 |#285577 |#ffffff |#2e9ef4 |#285577 | ||
228 | |focused_inactive |#333333 |#5f676a |#ffffff |#484e50 |#5f676a | ||
229 | |unfocused |#333333 |#222222 |#888888 |#292d2e |#222222 | ||
230 | |urgent |#2f343a |#900000 |#ffffff |#900000 |#900000 | ||
231 | |placeholder |#000000 |#0c0c0c |#ffffff |#000000 |#0c0c0c | ||
232 | |=========================================================================== | ||
233 | -- | ||
234 | |||
235 | **debuglog** <on|off|toggle>:: | ||
236 | Enables, disables or toggles debug logging. The toggle argument cannot be used | ||
237 | in the configuration file. | ||
238 | |||
239 | **default_border** <normal|none|pixel> [<n>]:: | ||
240 | Set default border style for new windows. This command was previously called | ||
241 | **new_window**. While **new_window** still works, it is considered deprecated | ||
242 | and support for it will be removed in the future. | ||
243 | |||
244 | **default_floating_border** <normal|none|pixel> [<n>]:: | ||
245 | Set default border style for new floating windows. This only applies to | ||
246 | windows that are spawned in floating mode, not windows that become floating | ||
247 | after the fact. This command was previously called **new_float**. While | ||
248 | **new_float** still works, it is considered deprecated and support for it will | ||
249 | be removed in the future. | ||
250 | |||
251 | **exec** <shell command>:: | ||
252 | Executes _shell command_ with sh. | ||
253 | |||
254 | **exec_always** <shell command>:: | ||
255 | Like exec, but the shell command will be executed _again_ after *reload* or | ||
256 | *restart* is executed. | ||
257 | |||
258 | **floating_maximum_size** <width> x <height>:: | ||
259 | Specifies the maximum size of floating windows. | ||
260 | Uses the container size as default. | ||
261 | -1 x -1 will remove any restriction on size. | ||
262 | 0 x 0 has the same behavior as not setting any value. | ||
263 | If in conflict, this option has precedence over floating_minimum_size. | ||
264 | |||
265 | **floating_minimum_size** <width> x <height>:: | ||
266 | Specifies the minimum size of floating windows. | ||
267 | Default parameters are 75 x 50. | ||
268 | -1 and 0 are invalid parameters, default will be used instead. | ||
269 | |||
270 | **floating_modifier** <modifier> [normal|inverse]:: | ||
271 | When the _modifier_ key is held down, you may hold left click to move floating | ||
272 | windows, and right click to resize them. Unlike i3, this modifier may also be | ||
273 | used to resize and move windows that are tiled. With the _inverse_ mode | ||
274 | enabled, left click is used for resizing and right click for dragging. The | ||
275 | mode parameter is optional and defaults to _normal_ if it isn't defined. | ||
276 | |||
277 | **floating_scroll** <up|down|left|right> [command]:: | ||
278 | Sets a command to be executed when the mouse wheel is scrolled in the | ||
279 | specified direction while holding the floating modifier. Resets the command, | ||
280 | when given no arguments. | ||
281 | |||
282 | **focus_follows_mouse** <yes|no>:: | ||
283 | If set to _yes_, moving your mouse over a window will focus that window. | ||
284 | |||
285 | **font** <font>:: | ||
286 | Sets font for use in title bars. Generally the format is something like "Name | ||
287 | Style Size" e.g. "Deja Vu Sans Book 12". You can also use Pango font | ||
288 | descriptions with "pango:font". | ||
289 | |||
290 | **for_window** <criteria> <command>:: | ||
291 | Whenever a window that matches _criteria_ appears, run list of commands. See | ||
292 | **Criteria** section below. | ||
293 | |||
294 | **gaps** edge_gaps <on|off|toggle>:: | ||
295 | Whether or not to add gaps between views and workspace edges if amount of | ||
296 | inner gap is not zero. When _off_, no gap is added where the view is aligned to | ||
297 | the workspace edge, effectively creating gaps only between views. The toggle | ||
298 | argument cannot be used in the configuration file. | ||
299 | |||
300 | **gaps** <amount>:: | ||
301 | Sets default _amount_ pixels as the gap between each view, and around each | ||
302 | workspace. | ||
303 | |||
304 | **gaps** <inner|outer> <amount>:: | ||
305 | Sets default _amount_ pixels as the _inner_ or _outer_ gap, where the former | ||
306 | affects spacing between views and the latter affects the space around each | ||
307 | workspace. | ||
308 | |||
309 | **gaps** <inner|outer> <all|workspace|current> <set|plus|minus> <amount>:: | ||
310 | Changes the gaps for the _inner_ or _outer_ gap. _all_ changes the gaps for | ||
311 | all views or workspace, _workspace_ changes gaps for all views in current | ||
312 | workspace (or current workspace), and _current_ changes gaps for the current | ||
313 | view or workspace. | ||
314 | |||
315 | **hide_edge_borders** <none|vertical|horizontal|both|smart>:: | ||
316 | Hide window borders adjacent to the screen edges. Default is _none_. | ||
317 | |||
318 | **input** <input_device> <block of commands>:: | ||
319 | Append _{_ to this command, the following lines will be commands to configure | ||
320 | the named input device, and _}_ on its own line will close the block. | ||
321 | + | ||
322 | **input * <block of commands>** may be used to match all input devices. | ||
323 | + | ||
324 | See **sway-input**(5) for details. | ||
325 | |||
326 | **seat** <seat_name> <block of commands>:: | ||
327 | Append _{_ to this command, the following lines will be commands to configure | ||
328 | the named seat, and _}_ on its own line will close the block. | ||
329 | See **sway-input**(5) for details. | ||
330 | |||
331 | **seat** <seat_name> cursor <move|set> <x> <y>:: | ||
332 | Move cursor relatively to current position or set to absolute screen position. | ||
333 | A value of 0 causes the axis to be ignored in both commands. | ||
334 | |||
335 | **seat** <seat_name> cursor <press|release> <left|right|1|2|3...>:: | ||
336 | Simulate press of mouse button specified by left, right, or numerical code. | ||
337 | |||
338 | **kill**:: | ||
339 | Kills (force-closes) the currently-focused container and all of its children. | ||
340 | |||
341 | **smart_gaps** <on|off>:: | ||
342 | If smart_gaps are _on_ then gaps will only be enabled if a workspace has more | ||
343 | than one child container. | ||
344 | |||
345 | **mark** \<--add|--replace> \<--toggle> <identifier>:: | ||
346 | Marks are arbitrary labels that can be used to identify certain windows and | ||
347 | then jump to them at a later time. By default, the **mark** command sets | ||
348 | _identifier_ as the only mark on a window. By specifying _--add_, mark will | ||
349 | add _identifier_ to the list of current marks. If _--toggle_ is specified mark | ||
350 | will remove _identifier_ if it is already a label. Marks may be found by using | ||
351 | a criteria. See the **Criteria** section below. | ||
352 | |||
353 | **mode** <mode_name>:: | ||
354 | Switches to the given mode_name. The default mode is simply _default_. To | ||
355 | create a new mode append _{_ to this command, the following lines | ||
356 | will be keybindings for that mode, and _}_ on its own line to close the block. | ||
357 | |||
358 | **mouse_warping** <output|none>:: | ||
359 | When _output_: place mouse at center of newly focused window when changing | ||
360 | output. When _none_: don't move mouse. | ||
361 | |||
362 | **no_focus** <criteria>:: | ||
363 | Prevents windows matching <criteria> from being focused automatically when | ||
364 | they're created. This does not apply to the first window in a workspace. | ||
365 | |||
366 | **output** <name> mode|resolution|res <WIDTHxHEIGHT>[@<RATE>[Hz]]:: | ||
367 | Configures the specified output to use the given mode. Modes are a combination | ||
368 | of width and height (in pixels) and a refresh rate that your display can be | ||
369 | configured to use. For a list of available modes, use swaymsg -t get_outputs. | ||
370 | + | ||
371 | Examples: | ||
372 | + | ||
373 | output HDMI-A-1 mode 1920x1080 | ||
374 | + | ||
375 | output HDMI-A-1 mode 1920x1080@60Hz | ||
376 | |||
377 | **output** <name> position|pos <X,Y>:: | ||
378 | Configures the specified output to be arranged at the given position. | ||
379 | |||
380 | **output** <name> scale <I>:: | ||
381 | Configures the specified output to be scaled up by the specified integer | ||
382 | scaling factor (usually 2 for HiDPI screens). Fractional scaling is supported. | ||
383 | |||
384 | **output** <name> background|bg <file> <mode>:: | ||
385 | Sets the wallpaper for the given output to the specified file, using the given | ||
386 | scaling mode (one of "stretch", "fill", "fit", "center", "tile"). | ||
387 | |||
388 | **output** <name> background|bg <color> solid_color:: | ||
389 | Sets the background of the given output to the specified color. _color_ should | ||
390 | be specified as an _#rrggbb_ (no alpha) color. | ||
391 | |||
392 | **output** <name> transform <transform>:: | ||
393 | Sets the background transform to the given value. Can be one of "90", "180", | ||
394 | "270" for rotation; or "flipped", "flipped-90", "flipped-180", "flipped-270" | ||
395 | to apply a rotation and flip, or "normal" to apply no transform. | ||
396 | |||
397 | **output** <name> disable:: | ||
398 | Disables the specified output. | ||
399 | |||
400 | **NOTES FOR THE OUTPUT COMMAND**:: | ||
401 | You may combine output commands into one, like so: | ||
402 | + | ||
403 | output HDMI-A-1 mode 1920x1080 pos 1920,0 bg ~/wallpaper.png stretch | ||
404 | + | ||
405 | You can get a list of output names like so: | ||
406 | + | ||
407 | swaymsg -t get_outputs | ||
408 | + | ||
409 | You may also match any output by using the output name "*". Be sure to add | ||
410 | this output config after the others, or it will be matched instead of the | ||
411 | others. | ||
412 | |||
413 | **seamless_mouse** <on|off>:: | ||
414 | Change output seamlessly when pointer touches edge of output. Outputs need to | ||
415 | be configured with perfectly aligned adjacent positions for this option to | ||
416 | have any effect. | ||
417 | |||
418 | **show_marks** <on|off>:: | ||
419 | If **show_marks** is on then marks will be showed in the window decoration. | ||
420 | However, any mark that starts with an underscore will not be drawn even if the | ||
421 | option is on. The default option is _on_. | ||
422 | |||
423 | **opacity** <value>:: | ||
424 | Set the opacity of the window between 0 (completely transparent) and 1 | ||
425 | (completely opaque). | ||
426 | |||
427 | **unmark** <identifier>:: | ||
428 | **Unmark** will remove _identifier_ from the list of current marks on a window. If | ||
429 | no _identifier_ is specified, then **unmark** will remove all marks. | ||
430 | |||
431 | **workspace** [number] <name>:: | ||
432 | Switches to the specified workspace. The string "number" is optional. The | ||
433 | workspace _name_, if unquoted, may not contain the string "output", as sway | ||
434 | will assume that the command is moving a workspace to an output, as described | ||
435 | below. | ||
436 | |||
437 | **workspace** <prev|next>:: | ||
438 | Switches to the next workspace on the current output or on the next output | ||
439 | if currently on the last workspace. | ||
440 | |||
441 | **workspace** <prev_on_output|next_on_output>:: | ||
442 | Switches to the next workspace on the current output. | ||
443 | |||
444 | **workspace** <name> output <output>:: | ||
445 | Specifies that the workspace named _name_ should appear on the specified | ||
446 | _output_. | ||
447 | |||
448 | **workspace_auto_back_and_forth** <yes|no>:: | ||
449 | When _yes_, repeating a workspace switch command will switch back to the | ||
450 | prior workspace. For example, if you are currently on workspace 1, | ||
451 | switch to workspace 2, then invoke the "workspace 2" command again, you | ||
452 | will be returned to workspace 1. Defaults to _no_. | ||
453 | |||
454 | **workspace_layout** <default|stacking|tabbed|auto|auto left|auto right|auto | ||
455 | top|auto bottom>:: Specifies the start layout for new workspaces. | ||
456 | |||
457 | **include** <path>:: | ||
458 | Includes a sub config file by _path_. _path_ can be either a full path or a | ||
459 | path relative to the parent config. | ||
460 | |||
461 | Criteria | ||
462 | -------- | ||
463 | |||
464 | A criteria is a string in the form of e.g.: | ||
465 | |||
466 | [class="[Rr]egex.*" title="some title"] | ||
467 | |||
468 | The string contains one or more (space separated) attribute/value pairs. They | ||
469 | are used by some commands to choose which views to execute actions on. All attributes | ||
470 | must match for the criteria to match. | ||
471 | |||
472 | Criteria may be used with either the **for_window** or **assign** commands to | ||
473 | specify operations to perform on new views. A criteria may also be used to | ||
474 | perform specific commands (ones that normally act upon one window) on all views | ||
475 | that match that criteria. For example: | ||
476 | |||
477 | Focus on a window with the mark "IRC": | ||
478 | [con_mark="IRC"] focus | ||
479 | |||
480 | Kill all windows with the title "Emacs": | ||
481 | [class="Emacs"] kill | ||
482 | |||
483 | Mark all Firefox windows with "Browser": | ||
484 | [class="Firefox"] mark Browser | ||
485 | |||
486 | Currently supported attributes: | ||
487 | |||
488 | **app_id**:: | ||
489 | Compare value against the app id. Can be a regular expression. If value is | ||
490 | __focused__, then the app id must be the same as that of the currently | ||
491 | focused window. | ||
492 | |||
493 | **class**:: | ||
494 | Compare value against the window class. Can be a regular expression. If | ||
495 | value is __focused__, then the window class must be the same as that of the | ||
496 | currently focused window. | ||
497 | |||
498 | **con_id**:: | ||
499 | Compare against the internal container ID, which you can find via IPC. | ||
500 | |||
501 | **con_mark**:: | ||
502 | Compare against the window marks. Can be a regular expression. | ||
503 | |||
504 | **floating**:: | ||
505 | Matches against floating windows. | ||
506 | |||
507 | **id**:: | ||
508 | Compare value against the X11 window id. Must be numeric. | ||
509 | |||
510 | **instance**:: | ||
511 | Compare value against the window instance. Can be a regular expression. If | ||
512 | value is __focused__, then the window instance must be the same as that of | ||
513 | the currently focused window. | ||
514 | |||
515 | **tiling**:: | ||
516 | Matches against tiling windows. | ||
517 | |||
518 | **title**:: | ||
519 | Compare against the window title. Can be a regular expression. If value is | ||
520 | __focused__, then the window title must be the same as that of the currently | ||
521 | focused window. | ||
522 | |||
523 | **urgent**:: | ||
524 | Compares the urgent state of the window. Can be "latest" or "oldest". | ||
525 | |||
526 | **window_role**:: | ||
527 | Compare against the window role (WM_WINDOW_ROLE). Can be a regular | ||
528 | expression. If value is __focused__, then the window role must be the same | ||
529 | as that of the currently focused window. | ||
530 | |||
531 | **window_type**:: | ||
532 | Compare against the window type (_NET_WM_WINDOW_TYPE). Possible values are | ||
533 | normal, dialog, utility, toolbar, splash, menu, dropdown_menu, popup_menu, | ||
534 | tooltip and notification. | ||
535 | |||
536 | **workspace**:: | ||
537 | Compare against the workspace name for this view. Can be a regular | ||
538 | expression. If the value is __focused__, then all the views on the currently | ||
539 | focused workspace matches. | ||
540 | |||
541 | See Also | ||
542 | -------- | ||
543 | |||
544 | **sway**(1) **sway-input**(5) **sway-bar**(5) | ||