1sway(5)                       File Formats Manual                      sway(5)
2
3
4

NAME

6       sway - configuration file and commands
7

DESCRIPTION

9       A sway configuration file is a list of sway commands that are executed
10       by sway on startup.  These commands usually consist of setting your
11       preferences and setting key bindings. An example config is likely
12       present in /etc/sway/config for you to check out.
13
14       Lines in the configuration file might be extended through multiple
15       lines by adding a '\' character at the end of line. e.g.:
16
17           bindsym Shift+XF86AudioRaiseVolume exec \
18                pactl set-sink-volume @DEFAULT_SINK@ -1%
19
20       Commands can also be given as a block in the form command { <subcom‐
21       mands...> }. Anything before the opening { will be prepended to the
22       lines inside the block. For example:
23
24           output eDP-1 {
25                background ~/wallpaper.png
26                resolution 1920x1080
27           }
28
29       is identical to
30
31           output eDP-1 background ~/wallpaper.png
32           output eDP-1 resolution 1920x1080
33
34       These commands can be executed in your config file, via swaymsg(1), or
35       via the bindsym command.
36

COMMAND CONVENTIONS

38       Commands are split into several arguments using spaces. You can enclose
39       arguments with quotation marks ("..." or '...') to add spaces to a sin‐
40       gle argument. You may also run several commands in order by separating
41       each with , or ;. Criteria is retained across commands separated by ,,
42       but will be reset (and allow for new criteria, if desired) for commands
43       separated by a ;.
44
45       Throughout the documentation, | is used to distinguish between argu‐
46       ments for which you may only select one. [...] is used for optional
47       arguments, and <...> for arguments where you are expected to supply
48       some value.
49

COMMANDS

51       The following commands may only be used in the configuration file.
52
53       bar [<bar-id>] <bar-subcommands...>
54           For details on bar subcommands, see sway-bar(5).
55
56       default_orientation horizontal|vertical|auto
57           Sets the default container layout for tiled containers.
58
59       include <path>
60           Includes another file from path. path can be either a full path or
61           a path relative to the parent config, and expands shell syntax (see
62           wordexp(3) for details). The same include file can only be included
63           once; subsequent attempts will be ignored.
64
65       swaybg_command <command>
66           Executes custom background command. Default is swaybg. Refer to
67           sway-output(5) for more information.
68
69           It can be disabled by setting the command to a single dash:
70           swaybg_command -
71
72       swaynag_command <command>
73           Executes custom command for swaynag. Default is swaynag. Additional
74           arguments may be appended to the end. This should only be used to
75           either direct sway to call swaynag from a custom path or to provide
76           additional arguments. This should be placed at the top of the con‐
77           fig for the best results.
78
79           It can be disabled by setting the command to a single dash: sway‐
80           nag_command -
81
82       workspace_layout default|stacking|tabbed
83           Specifies the initial layout for new workspaces.
84
85       xwayland enable|disable|force
86           Enables or disables Xwayland support, which allows X11 applications
87           to be used. enable will lazily load Xwayland so Xwayland will not
88           be launched until the first client attempts to connect. In some
89           cases, such as slower machines, it may be desirable to have Xway‐
90           land started immediately by using force instead of enable.
91
92       The following commands cannot be used directly in the configuration
93       file.  They are expected to be used with bindsym or at runtime through
94       swaymsg(1).
95
96       border none|normal|csd|pixel [<n>]
97           Set border style for focused window. normal includes a border of
98           thickness n and a title bar. pixel is a border without title bar n
99           pixels thick. Default is normal with border thickness 2. csd is
100           short for client-side-decorations, which allows the client to draw
101           its own decorations.
102
103       border toggle
104           Cycles through the available border styles.
105
106       exit
107           Exit sway and end your Wayland session.
108
109       floating enable|disable|toggle
110           Make focused view floating, non-floating, or the opposite of what
111           it is now.
112
113       <criteria> focus
114           Moves focus to the container that matches the specified criteria.
115
116       focus up|right|down|left
117           Moves focus to the next container in the specified direction.
118
119       focus prev|next [sibling]
120           Moves focus to the previous or next container in the current lay‐
121           out. By default, the last active child of the newly focused con‐
122           tainer will be focused. The sibling option indicates not to immedi‐
123           ately focus a child of the container.
124
125       focus child
126           Moves focus to the last-focused child of the focused container.
127
128       focus parent
129           Moves focus to the parent of the focused container.
130
131       focus output up|right|down|left
132           Moves focus to the next output in the specified direction.
133
134       focus output <name>
135           Moves focus to the named output.
136
137       focus tiling
138           Sets focus to the last focused tiling container.
139
140       focus floating
141           Sets focus to the last focused floating container.
142
143       focus mode_toggle
144           Moves focus between the floating and tiled layers.
145
146       fullscreen [enable|disable|toggle] [global]
147           Makes focused view fullscreen, non-fullscreen, or the opposite of
148           what it is now. If no argument is given, it does the same as tog‐
149           gle. If global is specified, the view will be fullscreen across all
150           outputs.
151
152       gaps inner|outer|horizontal|vertical|top|right|bottom|left all|current
153       set|plus|minus <amount>
154           Changes the inner or outer gaps for either all workspaces or the
155           current workspace. outer gaps can be altered per side with top,
156           right, bottom, and left or per direction with horizontal and verti‐
157           cal.
158
159       inhibit_idle focus|fullscreen|open|none|visible
160           Set/unset an idle inhibitor for the view. focus will inhibit idle
161           when the view is focused by any seat. fullscreen will inhibit idle
162           when the view is fullscreen (or a descendant of a fullscreen con‐
163           tainer) and is visible. open will inhibit idle until the view is
164           closed (or the inhibitor is unset/changed). visible will inhibit
165           idle when the view is visible on any output. none will remove any
166           existing idle inhibitor for the view.
167
168           This can also be used with criteria to set an idle inhibitor for
169           any existing view or with for_window to set idle inhibitors for
170           future views.
171
172       layout default|splith|splitv|stacking|tabbed
173           Sets the layout mode of the focused container.
174
175       layout toggle [split|all]
176           Cycles the layout mode of the focused container though a preset
177           list of layouts. If no argument is given, then it cycles through
178           stacking, tabbed and the last split layout. If "split" is given,
179           then it cycles through splith and splitv. If "all" is given, then
180           it cycles through every layout.
181
182       layout toggle [split|tabbed|stacking|splitv|splith]
183       [split|tabbed|stacking|splitv|splith]...
184           Cycles the layout mode of the focused container through a list of
185           layouts.
186
187       max_render_time off|<msec>
188           Works together with output max_render_time to reduce the latency
189           even further by delaying the frame callbacks sent to a surface.
190           When set to a positive number of milliseconds, delays the frame
191           callback in such a way that the surface has the specified number of
192           milliseconds to render and commit new contents before being sampled
193           by the compositor for the next presentation. See max_render_time in
194           sway-output(5) for further details.
195
196           To set this up for optimal latency:
197           1.   Set up output max_render_time.
198           2.   Put the target application in full-screen and have it continu‐
199               ously render something.
200           3.   Start by setting max_render_time 1. If the application drops
201               frames, increment by 1.
202
203
204       move left|right|up|down [<px> px]
205           Moves the focused container in the direction specified. If the con‐
206           tainer, the optional px argument specifies how many pixels to move
207           the container.  If unspecified, the default is 10 pixels. Pixels
208           are ignored when moving tiled containers.
209
210       move [absolute] position <pos_x> [px] <pos_y> [px]
211           Moves the focused container to the specified position in the
212           workspace. If absolute is used, the position is relative to all
213           outputs.
214
215       move [absolute] position center
216           Moves the focused container to be centered on the workspace. If
217           absolute is used, it is moved to the center of all outputs.
218
219       move position cursor|mouse|pointer
220           Moves the focused container to be centered on the cursor.
221
222       move [container|window] [to] mark <mark>
223           Moves the focused container to the specified mark.
224
225       move [--no-auto-back-and-forth] [container|window] [to] workspace [num‐
226       ber] <name>
227           Moves the focused container to the specified workspace. The string
228           "number" is optional and is used to match a workspace with the same
229           number, even if it has a different name.
230
231       move [container|window] [to] workspace prev|next|current
232           Moves the focused container to the previous, next or current
233           workspace on this output, or if no workspaces remain, the previous
234           or next output.
235
236       move [container|window] [to] workspace prev_on_output|next_on_output
237           Moves the focused container to the previous or next workspace on
238           this output, wrapping around if already at the first or last
239           workspace.
240
241       move [container|window] [to] workspace back_and_forth
242           Moves the focused container to previously focused workspace.
243
244       move [container|window] [to] output <name-or-id>|current
245           Moves the focused container to the specified output.
246
247       move [container|window] [to] output up|right|down|left
248           Moves the focused container to next output in the specified direc‐
249           tion.
250
251       move [container|window] [to] scratchpad
252           Moves the focused container to the scratchpad.
253
254       move workspace [to] output <name-or-id>|current
255           Moves the focused workspace to the specified output.
256
257       move workspace to [output] <name-or-id>|current
258           Moves the focused workspace to the specified output.
259
260       move workspace [to] output up|right|down|left
261           Moves the focused workspace to next output in the specified direc‐
262           tion.
263
264       move workspace to [output] up|right|down|left
265           Moves the focused workspace to next output in the specified direc‐
266           tion.
267
268       nop <comment>
269           A no operation command that can be used to override default behav‐
270           iour. The optional comment argument is ignored, but logged for
271           debugging purposes.
272
273       reload
274           Reloads the sway config file and applies any changes.
275
276       rename workspace [<old_name>] to <new_name>
277           Rename either <old_name> or the focused workspace to the <new_name>
278
279       resize shrink|grow width|height [<amount> [px|ppt]]
280           Resizes the currently focused container by amount, specified in
281           pixels or percentage points. If the units are omitted, floating
282           containers are resized in px and tiled containers by ppt. amount
283           will default to 10 if omitted.
284
285       resize set height <height> [px|ppt]
286           Sets the height of the container to height, specified in pixels or
287           percentage points. If the units are omitted, floating containers
288           are resized in px and tiled containers by ppt. If height is 0, the
289           container will not be resized.
290
291       resize set [width] <width> [px|ppt]
292           Sets the width of the container to width, specified in pixels or
293           percentage points. If the units are omitted, floating containers
294           are resized in px and tiled containers by ppt. If width is 0, the
295           container will not be resized.
296
297       resize set [width] <width> [px|ppt] [height] <height> [px|ppt]
298           Sets the width and height of the container to width and height,
299           specified in pixels or percentage points. If the units are omitted,
300           floating containers are resized in px and tiled containers by ppt.
301           If width or height is 0, the container will not be resized on that
302           axis.
303
304       scratchpad show
305           Shows a window from the scratchpad. Repeatedly using this command
306           will cycle through the windows in the scratchpad.
307
308       split vertical|v|horizontal|h|toggle|t
309           Splits the current container, vertically or horizontally. When tog‐
310           gle is specified, the current container is split opposite to the
311           parent container's layout.
312
313       splith
314           Equivalent to split horizontal
315
316       splitv
317           Equivalent to split vertical
318
319       splitt
320           Equivalent to split toggle
321
322       sticky enable|disable|toggle
323           "Sticks" a floating window to the current output so that it shows
324           up on all workspaces.
325
326       swap container with id|con_id|mark <arg>
327           Swaps the position, geometry, and fullscreen status of two contain‐
328           ers. The first container can be selected either by criteria or
329           focus. The second container can be selected by id, con_id, or mark.
330           id can only be used with xwayland views. If the first container has
331           focus, it will retain focus unless it is moved to a different
332           workspace or the second container becomes fullscreen on the same
333           workspace as the first container. In either of those cases, the
334           second container will gain focus.
335
336       title_format <format>
337           Sets the format of window titles. The following placeholders may be
338           used:
339
340               %title - The title supplied by the window
341                         %app_id - The wayland app ID (applicable to wayland
342               windows only)
343                         %class - The X11 classname (applicable to xwayland
344               windows only)
345                         %instance - The X11 instance (applicable to xwayland
346               windows only)
347                         %shell - The protocol the window is using (typically
348               xwayland or
349                   xdg_shell)
350
351           This command is typically used with for_window criteria. For exam‐
352           ple:
353
354               for_window [title="."] title_format "<b>%title</b> (%app_id)"
355
356           Note that markup requires pango to be enabled via the font command.
357
358           The default format is "%title".
359
360       The following commands may be used either in the configuration file or
361       at runtime.
362
363       assign <criteria> [→] [workspace] [number] <workspace>
364           Assigns views matching criteria (see CRITERIA for details) to
365           workspace. The → (U+2192) is optional and cosmetic. This command is
366           equivalent to:
367
368               for_window <criteria> move container to workspace <workspace>
369
370       assign <criteria> [→] output left|right|up|down|<name>
371           Assigns views matching criteria (see CRITERIA for details) to the
372           specified output. The → (U+2192) is optional and cosmetic. This
373           command is equivalent to:
374
375               for_window <criteria> move container to output <output>
376
377       bindsym [--whole-window] [--border] [--exclude-titlebar] [--release]
378       [--locked] [--to-code] [--input-device=<device>] [--no-warn]
379       [Group<1-4>+]<key combo> <command>
380           Binds key combo to execute the sway command command when pressed.
381           You may use XKB key names here (xev(1) is a good tool for discover‐
382           ing these).  With the flag --release, the command is executed when
383           the key combo is released. If input-device is given, the binding
384           will only be executed for that input device and will be executed
385           instead of any binding that is generic to all devices. If a group
386           number is given, then the binding will only be available for that
387           group. By default, if you overwrite a binding, swaynag will give
388           you a warning. To silence this, use the --no-warn flag.
389
390           Unless the flag --locked is set, the command will not be run when a
391           screen locking program is active. If there is a matching binding
392           with and without --locked, the one with will be preferred when
393           locked and the one without will be preferred when unlocked. If
394           there are matching bindings and one has both --input-device and
395           --locked and the other has neither, the former will be preferred
396           even when unlocked.
397
398           Bindings to keysyms are layout-dependent. This can be changed with
399           the --to-code flag. In this case, the keysyms will be translated
400           into the corresponding keycodes in the first configured layout.
401
402           Mouse bindings operate on the container under the cursor instead of
403           the container that has focus. Mouse buttons can either be specified
404           in the form button[1-9] or by using the name of the event code (ex
405           BTN_LEFT or BTN_RIGHT). For the former option, the buttons will be
406           mapped to their values in X11 (1=left, 2=middle, 3=right, 4=scroll
407           up, 5=scroll down, 6=scroll left, 7=scroll right, 8=back, 9=for‐
408           ward). For the latter option, you can find the event names using
409           libinput debug-events.
410
411           The priority for matching bindings is as follows: input device,
412           group, and locked state.
413
414           --whole-window, --border, and --exclude-titlebar are mouse-only
415           options which affect the region in which the mouse bindings can be
416           triggered.  By default, mouse bindings are only triggered when over
417           the title bar. With the --border option, the border of the window
418           will be included in this region.  With the --whole-window option,
419           the cursor can be anywhere over a window including the title, bor‐
420           der, and content. --exclude-titlebar can be used in conjunction
421           with any other option to specify that the titlebar should be
422           excluded from the region of consideration.
423
424           If --whole-window is given, the command can be triggered when the
425           cursor is over an empty workspace. Using a mouse binding over a
426           layer surface's exclusive region is not currently possible.
427
428           Example:
429                     # Execute firefox when alt, shift, and f are pressed together
430                     bindsym Mod1+Shift+f exec firefox
431
432           bindcode [--whole-window] [--border] [--exclude-titlebar]
433           [--release] [--locked] [--input-device=<device>] [--no-warn]
434           [Group<1-4>+]<code> <command> is also available for binding with
435           key/button codes instead of key/button names.
436
437       bindswitch [--locked] [--no-warn] [--reload] <switch>:<state> <command>
438           Binds <switch> to execute the sway command command on state
439           changes.  Supported switches are lid (laptop lid) and tablet
440           (tablet mode) switches. Valid values for state are on, off and tog‐
441           gle. These switches are on when the device lid is shut and when
442           tablet mode is active respectively. toggle is also supported to run
443           a command both when the switch is toggled on or off.
444
445           Unless the flag --locked is set, the command will not be run when a
446           screen locking program is active. If there is a matching binding
447           with and without --locked, the one with will be preferred when
448           locked and the one without will be preferred when unlocked.
449
450           If the --reload flag is given, the binding will also be executed
451           when the config is reloaded. toggle bindings will not be executed
452           on reload.  The --locked flag will operate as normal so if the con‐
453           fig is reloaded while locked and --locked is not given, the binding
454           will not be executed.
455
456           By default, if you overwrite a binding, swaynag will give you a
457           warning. To silence this, use the --no-warn flag.
458
459           Example:
460                     # Show the virtual keyboard when tablet mode is entered.
461                     bindswitch tablet:on busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true
462
463                     # Log a message when the laptop lid is opened or closed.
464                     bindswitch lid:toggle exec echo "Lid moved"
465
466       client.background <color>
467           This command is ignored and is only present for i3 compatibility.
468
469       client.<class> <border> <background> <text> [<indicator> [<child_bor‐
470       der>]]
471           Configures the color of window borders and title bars. The first
472           three colors are required. When omitted indicator will use a sane
473           default and child_border will use the color set for background.
474           Colors may be specified in hex, either as #RRGGBB or #RRGGBBAA.
475
476           The available classes are:
477
478           client.focused
479               The window that has focus.
480
481           client.focused_inactive
482               The most recently focused view within a container which is not
483               focused.
484
485           client.placeholder
486               Ignored (present for i3 compatibility).
487
488           client.unfocused
489               A view that does not have focus.
490
491           client.urgent
492               A view with an urgency hint. Note: Native Wayland windows do
493               not support urgency. Urgency only works for Xwayland windows.
494
495           The meaning of each color is:
496
497           border
498               The border around the title bar.
499
500           background
501               The background of the title bar.
502
503           text
504               The text color of the title bar.
505
506           indicator
507               The color used to indicate where a new view will open. In a
508               tiled container, this would paint the right border of the cur‐
509               rent view if a new view would be opened to the right.
510
511           child_border
512               The border around the view itself.
513
514       The default colors are:
515
516       ┌──────────────┬─────────┬────────────┬─────────┬───────────┬────────────┐
517class     borderbackgroundtextindicatorchild_bor‐
518       │              │         │            │         │           │ der
519       ├──────────────┼─────────┼────────────┼─────────┼───────────┼────────────┤
520background    │ n/a     │ #ffffff    │ n/a     │ n/a       │ n/a        │
521       ├──────────────┼─────────┼────────────┼─────────┼───────────┼────────────┤
522focused       │ #4c7899 │ #285577    │ #ffffff │ #2e9ef4   │ #285577    │
523       ├──────────────┼─────────┼────────────┼─────────┼───────────┼────────────┤
524focused_inac‐ │ #333333 │ #5f676a    │ #ffffff │ #484e50   │ #5f676a    │
525tive          │         │            │         │           │            │
526       ├──────────────┼─────────┼────────────┼─────────┼───────────┼────────────┤
527unfocused     │ #333333 │ #222222    │ #888888 │ #292d2e   │ #222222    │
528       ├──────────────┼─────────┼────────────┼─────────┼───────────┼────────────┤
529urgent        │ #2f343a │ #900000    │ #ffffff │ #900000   │ #900000    │
530       ├──────────────┼─────────┼────────────┼─────────┼───────────┼────────────┤
531placeholder   │ #000000 │ #0c0c0c    │ #ffffff │ #000000   │ #0c0c0c    │
532       └──────────────┴─────────┴────────────┴─────────┴───────────┴────────────┘
533
534       default_border normal|none|pixel [<n>]
535           Set default border style for new tiled windows.
536
537       default_floating_border normal|none|pixel [<n>]
538           Set default border style for new floating windows. This only
539           applies to windows that are spawned in floating mode, not windows
540           that become floating afterwards.
541
542       exec <shell command>
543           Executes shell command with sh.
544
545       exec_always <shell command>
546           Like exec, but the shell command will be executed again after
547           reload.
548
549       floating_maximum_size <width> x <height>
550           Specifies the maximum size of floating windows. -1 x -1 removes the
551           upper limit. The default is 0 x 0, which will use the width and
552           height of the entire output layout as the maximums
553
554       floating_minimum_size <width> x <height>
555           Specifies the minimum size of floating windows. The default is 75 x
556           50.
557
558       floating_modifier <modifier> [normal|inverse]
559           When the modifier key is held down, you may hold left click to move
560           windows, and right click to resize them. If inverse is specified,
561           left click is used for resizing and right click for moving.
562
563       focus_follows_mouse yes|no|always
564           If set to yes, moving your mouse over a window will focus that win‐
565           dow. If set to always, the window under the cursor will always be
566           focused, even after switching between workspaces.
567
568       focus_on_window_activation smart|urgent|focus|none
569           This option determines what to do when an xwayland client requests
570           window activation. If set to urgent, the urgent state will be set
571           for that window. If set to focus, the window will become focused.
572           If set to smart, the window will become focused only if it is
573           already visible, otherwise the urgent state will be set. Default is
574           smart.
575
576       focus_wrapping yes|no|force|workspace
577           This option determines what to do when attempting to focus over the
578           edge of a container. If set to no, the focused container will
579           retain focus, if there are no other containers in the direction. If
580           set to yes, focus will be wrapped to the opposite edge of the con‐
581           tainer, if there are no other containers in the direction. If set
582           to force, focus will be wrapped to the opposite edge of the con‐
583           tainer, even if there are other containers in the direction. If set
584           to workspace, focus will wrap like in the yes case and additionally
585           wrap when moving outside of workspaces boundaries.  Default is yes.
586
587       font [pango:]<font>
588           Sets font to use for the title bars. To enable support for pango
589           markup, preface the font name with pango:. For example, monospace
590           10 is the default font. To enable support for pango markup,
591           pango:monospace 10 should be used instead. Regardless of whether
592           pango markup is enabled, font should be specified as a pango font
593           description. For more information on pango font descriptions, see
594           https://developer.gnome.org/pango/stable/pango-Fonts.html#pango-
595           font-description-from-string
596
597       titlebar_border_thickness <thickness>
598           Thickness of the titlebar border in pixels
599
600       titlebar_padding <horizontal> [<vertical>]
601           Padding of the text in the titlebar. horizontal value affects hori‐
602           zontal padding of the text while vertical value affects vertical
603           padding (space above and below text). Padding includes titlebar
604           borders so their value should be greater than titlebar_bor‐
605           der_thickness. If vertical value is not specified it is set to the
606           horizontal value.
607
608       for_window <criteria> <command>
609           Whenever a window that matches criteria appears, run list of com‐
610           mands.  See CRITERIA for more details.
611
612       gaps inner|outer|horizontal|vertical|top|right|bottom|left <amount>
613           Sets default amount pixels of inner or outer gap, where the inner
614           affects spacing around each view and outer affects the spacing
615           around each workspace. Outer gaps are in addition to inner gaps. To
616           reduce or remove outer gaps, outer gaps can be set to a negative
617           value. outer gaps can also be specified per side with top, right,
618           bottom, and left or per direction with horizontal and vertical.
619
620           This affects new workspaces only, and is used when the workspace
621           doesn't have its own gaps settings (see: workspace <ws> gaps ...).
622
623       hide_edge_borders [--i3] none|vertical|horizon‐
624       tal|both|smart|smart_no_gaps
625           Hides window borders adjacent to the screen edges. Default is none.
626           The --i3 option enables i3-compatible behavior to hide the title
627           bar on tabbed and stacked containers with one child. The
628           smart|smart_no_gaps options are equivalent to setting smart_borders
629           smart|no_gaps and hide_edge_borders none.
630
631       input <input_device> <input-subcommands...>
632           For details on input subcommands, see sway-input(5).
633
634           * may be used in lieu of a specific device name to configure all
635           input devices. A list of input device names may be obtained via
636           swaymsg -t get_inputs.
637
638       seat <seat> <seat-subcommands...>
639           For details on seat subcommands, see sway-input(5).
640
641       kill
642           Kills (closes) the currently focused container and all of its chil‐
643           dren.
644
645       smart_borders on|no_gaps|off
646           If smart_borders are on, borders will only be enabled if the
647           workspace has more than one visible child. If smart_borders is set
648           to no_gaps, borders will only be enabled if the workspace has more
649           than one visible child and gaps equal to zero.
650
651       smart_gaps on|off
652           If smart_gaps are on gaps will only be enabled if a workspace has
653           more than one child.
654
655       mark --add|--replace [--toggle] <identifier>
656           Marks are arbitrary labels that can be used to identify certain
657           windows and then jump to them at a later time. Each identifier can
658           only be set on a single window at a time since they act as a unique
659           identifier. By default, mark sets identifier as the only mark on a
660           window. --add will instead add identifier to the list of current
661           marks for that window. If --toggle is specified mark will remove
662           identifier if it is already marked.
663
664       mode <mode>
665           Switches to the specified mode. The default mode is default.
666
667       mode [--pango_markup] <mode> <mode-subcommands...>
668           The only valid mode-subcommands... are bindsym, bindcode,
669           bindswitch, and set. If --pango_markup is given, then mode will be
670           interpreted as pango markup.
671
672       mouse_warping output|container|none
673           If output is specified, the mouse will be moved to new outputs as
674           you move focus between them. If container is specified, the mouse
675           will be moved to the middle of the container on switch. Default is
676           output.
677
678       no_focus <criteria>
679           Prevents windows matching <criteria> from being focused automati‐
680           cally when they're created. This has no effect on the first window
681           in a workspace.
682
683       output <output_name> <output-subcommands...>
684           For details on output subcommands, see sway-output(5).
685
686           * may be used in lieu of a specific output name to configure all
687           outputs.  A list of output names may be obtained via swaymsg -t
688           get_outputs.
689
690       popup_during_fullscreen smart|ignore|leave_fullscreen
691           Determines what to do when a fullscreen view opens a dialog.  If
692           smart (the default), the dialog will be displayed. If ignore, the
693           dialog will not be rendered. If leave_fullscreen, the view will
694           exit fullscreen mode and the dialog will be rendered.
695
696       set $<name> <value>
697           Sets variable $name to value. You can use the new variable in the
698           arguments of future commands. When the variable is used, it can be
699           escaped with an additional $ (ie $$name) to have the replacement
700           happen at run time instead of when reading the config. However, it
701           does not always make sense for the variable to be replaced at run
702           time since some arguments do need to be known at config time.
703
704       show_marks yes|no
705           If show_marks is yes, marks will be displayed in the window bor‐
706           ders.  Any mark that starts with an underscore will not be drawn
707           even if show_marks is yes. The default is yes.
708
709       opacity [set|plus|minus] <value>
710           Adjusts the opacity of the window between 0 (completely transpar‐
711           ent) and 1 (completely opaque). If the operation is omitted, set
712           will be used.
713
714       tiling_drag  enable|disable|toggle
715           Sets whether or not tiling containers can be dragged with the
716           mouse. If enabled (default), the floating_mod can be used to drag
717           tiling, as well as floating, containers. Using the left mouse but‐
718           ton on title bars without the floating_mod will also allow the con‐
719           tainer to be dragged. toggle should not be used in the config file.
720
721       tiling_drag_threshold <threshold>
722           Sets the threshold that must be exceeded for a container to be
723           dragged by its titlebar. This has no effect if floating_mod is used
724           or if tiling_drag is set to disable.  Once the threshold has been
725           exceeded once, the drag starts and the cursor can come back inside
726           the threshold without stopping the drag.  threshold is multiplied
727           by the scale of the output that the cursor on.  The default is 9.
728
729       title_align left|center|right
730           Sets the title alignment. If right is selected and show_marks is
731           set to yes, the marks will be shown on the left side instead of the
732           right side.
733
734       unbindswitch <switch>:<state>
735           Removes a binding for when <switch> changes to <state>.
736
737       unbindsym [--whole-window] [--border] [--exclude-titlebar] [--release]
738       [--locked] [--to-code] [--input-device=<device>] <key combo>
739           Removes the binding for key combo that was previously bound with
740           the given flags.  If input-device is given, only the binding for
741           that input device will be unbound.
742
743           unbindcode [--whole-window] [--border] [--exclude-titlebar]
744           [--release] [--locked] [input-device=<device>] <code> is also
745           available for unbinding with key/button codes instead of key/button
746           names.
747
748       unmark [<identifier>]
749           unmark will remove identifier from the list of current marks on a
750           window. If identifier is omitted, all marks are removed.
751
752       urgent enable|disable|allow|deny
753           Using enable or disable manually sets or unsets the window's urgent
754           state. Using allow or deny controls the window's ability to set
755           itself as urgent. By default, windows are allowed to set their own
756           urgency.
757
758       workspace [--no-auto-back-and-forth] [number] <name>
759           Switches to the specified workspace. The string "number" is
760           optional and is used to sort workspaces.
761
762       workspace prev|next
763           Switches to the next workspace on the current output or on the next
764           output if currently on the last workspace.
765
766       workspace prev_on_output|next_on_output
767           Switches to the next workspace on the current output.
768
769       workspace back_and_forth
770           Switches to the previously focused workspace.
771
772       workspace <name> gaps inner|outer|horizontal|vertical|top|right|bot‐
773       tom|left <amount>
774           Specifies that workspace name should have the given gaps settings
775           when it is created.
776
777           This command does not affect existing workspaces. To alter the gaps
778           of an existing workspace, use the gaps command.
779
780       workspace <name> output <outputs...>
781           Specifies that workspace name should be shown on the specified out‐
782           puts.  Multiple outputs can be listed and the first available will
783           be used. If the workspace gets placed on an output further down the
784           list and an output that is higher on the list becomes available,
785           the workspace will be moved to the higher priority output.
786
787           This command does not affect existing workspaces. To move an exist‐
788           ing workspace, use the move command in combination with the
789           workspace criteria (non-empty workspaces only) or workspace command
790           (to switch to the workspace before moving).
791
792       workspace_auto_back_and_forth yes|no
793           When yes, repeating a workspace switch command will switch back to
794           the prior workspace. For example, if you are currently on workspace
795           1, switch to workspace 2, then invoke the "workspace 2" command
796           again, you will be returned to workspace 1. Default is no.
797

CRITERIA

799       A criteria is a string in the form of, for example:
800
801           [class="[Rr]egex.*" title="some title"]
802
803       The string contains one or more (space separated) attribute/value
804       pairs. They are used by some commands to choose which views to execute
805       actions on. All attributes must match for the criteria to match. Crite‐
806       ria is retained across commands separated by a ,, but will be reset
807       (and allow for new criteria, if desired) for commands separated by a ;.
808
809       Criteria may be used with either the for_window or assign commands to
810       specify operations to perform on new views. A criteria may also be used
811       to perform specific commands (ones that normally act upon one window)
812       on all views that match that criteria. For example:
813
814       Focus on a window with the mark "IRC":
815
816           [con_mark="IRC"] focus
817
818       Kill all windows with the title "Emacs":
819
820           [class="Emacs"] kill
821
822       You may like to use swaymsg -t get_tree for finding the values of these
823       properties in practice for your applications.
824
825       The following attributes may be matched with:
826
827       app_id
828           Compare value against the app id. Can be a regular expression. If
829           value is __focused__, then the app id must be the same as that of
830           the currently focused window. app_id are specific to Wayland appli‐
831           cations.
832
833       class
834           Compare value against the window class. Can be a regular expres‐
835           sion. If value is __focused__, then the window class must be the
836           same as that of the currently focused window. class are specific to
837           X11 applications.
838
839       con_id
840           Compare against the internal container ID, which you can find via
841           IPC. If value is __focused__, then the id must be the same as that
842           of the currently focused window.
843
844       con_mark
845           Compare against the window marks. Can be a regular expression.
846
847       floating
848           Matches floating windows.
849
850       id
851           Compare value against the X11 window ID. Must be numeric.
852
853       instance
854           Compare value against the window instance. Can be a regular expres‐
855           sion. If value is __focused__, then the window instance must be the
856           same as that of the currently focused window.
857
858       shell
859           Compare value against the window shell, such as "xdg_shell" or
860           "xwayland".  Can be a regular expression. If value is __focused__,
861           then the shell must be the same as that of the currently focused
862           window.
863
864       tiling
865           Matches tiling windows.
866
867       title
868           Compare against the window title. Can be a regular expression. If
869           value is __focused__, then the window title must be the same as
870           that of the currently focused window.
871
872       urgent
873           Compares the urgent state of the window. Can be "first", "last",
874           "latest", "newest", "oldest" or "recent".
875
876       window_role
877           Compare against the window role (WM_WINDOW_ROLE). Can be a regular
878           expression. If value is __focused__, then the window role must be
879           the same as that of the currently focused window.
880
881       window_type
882           Compare against the window type (_NET_WM_WINDOW_TYPE). Possible
883           values are normal, dialog, utility, toolbar, splash, menu, drop‐
884           down_menu, popup_menu, tooltip and notification.
885
886       workspace
887           Compare against the workspace name for this view. Can be a regular
888           expression. If the value is __focused__, then all the views on the
889           currently focused workspace matches.
890

SEE ALSO

892       sway(1) sway-input(5) sway-output(5) sway-bar(5) sway-ipc(7)
893
894
895
896                                  2020-02-26                           sway(5)
Impressum