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 ;.
42
43       Throughout the documentation, | is used to distinguish between argu‐
44       ments for which you may only select one. [...] is used for optional
45       arguments, and <...> for arguments where you are expected to supply
46       some value.
47

COMMANDS

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

BAR CONTROL

731       bar hidden_state hide|show|toggle [<bar_id>]
732           Sets the hidden state of the bar (see sway-bar(5)), either individ‐
733           ually, by specifying a bar id, or if none is given, for all bar
734           instances.  toggle switches between hide and show.
735
736       bar mode dock|hide|invisible|toggle [<bar_id>]
737           Sets the mode of the bar (see sway-bar(5)), either individually, by
738           specifying a bar id, or if none is given, for all bar instances.
739           toggle switches between dock and hide.
740

CRITERIA

742       A criteria is a string in the form of, for example:
743
744           [class="[Rr]egex.*" title="some title"]
745
746       The string contains one or more (space separated) attribute/value
747       pairs. They are used by some commands to choose which views to execute
748       actions on. All attributes must match for the criteria to match.
749
750       Criteria may be used with either the for_window or assign commands to
751       specify operations to perform on new views. A criteria may also be used
752       to perform specific commands (ones that normally act upon one window)
753       on all views that match that criteria. For example:
754
755       Focus on a window with the mark "IRC":
756
757           [con_mark="IRC"] focus
758
759       Kill all windows with the title "Emacs":
760
761           [class="Emacs"] kill
762
763       Mark all Firefox windows with "Browser":
764
765           [class="Firefox"] mark Browser
766
767       The following attributes may be matched with:
768
769       app_id
770           Compare value against the app id. Can be a regular expression. If
771           value is __focused__, then the app id must be the same as that of
772           the currently focused window.
773
774       class
775           Compare value against the window class. Can be a regular expres‐
776           sion. If value is __focused__, then the window class must be the
777           same as that of the currently focused window.
778
779       con_id
780           Compare against the internal container ID, which you can find via
781           IPC. If value is __focused__, then the id must be the same as that
782           of the currently focused window.
783
784       con_mark
785           Compare against the window marks. Can be a regular expression.
786
787       floating
788           Matches floating windows.
789
790       id
791           Compare value against the X11 window ID. Must be numeric.
792
793       instance
794           Compare value against the window instance. Can be a regular expres‐
795           sion. If value is __focused__, then the window instance must be the
796           same as that of the currently focused window.
797
798       shell
799           Compare value against the window shell, such as "xdg_shell" or
800           "xwayland".  Can be a regular expression. If value is __focused__,
801           then the shell must be the same as that of the currently focused
802           window.
803
804       tiling
805           Matches tiling windows.
806
807       title
808           Compare against the window title. Can be a regular expression. If
809           value is __focused__, then the window title must be the same as
810           that of the currently focused window.
811
812       urgent
813           Compares the urgent state of the window. Can be "first", "last",
814           "latest", "newest", "oldest" or "recent".
815
816       window_role
817           Compare against the window role (WM_WINDOW_ROLE). Can be a regular
818           expression. If value is __focused__, then the window role must be
819           the same as that of the currently focused window.
820
821       window_type
822           Compare against the window type (_NET_WM_WINDOW_TYPE). Possible
823           values are normal, dialog, utility, toolbar, splash, menu, drop‐
824           down_menu, popup_menu, tooltip and notification.
825
826       workspace
827           Compare against the workspace name for this view. Can be a regular
828           expression. If the value is __focused__, then all the views on the
829           currently focused workspace matches.
830

SEE ALSO

832       sway(1) sway-input(5) sway-output(5) sway-bar(5) sway-ipc(7)
833
834
835
836                                  2019-07-27                           sway(5)
Impressum