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

CRITERIA

848       A criteria is a string in the form of, for example:
849
850           [class="[Rr]egex.*" title="some title"]
851
852       The string contains one or more (space separated) attribute/value
853       pairs. They are used by some commands to choose which views to execute
854       actions on. All attributes must match for the criteria to match. Crite‐
855       ria is retained across commands separated by a ,, but will be reset
856       (and allow for new criteria, if desired) for commands separated by a ;.
857
858       Criteria may be used with either the for_window or assign commands to
859       specify operations to perform on new views. A criteria may also be used
860       to perform specific commands (ones that normally act upon one window)
861       on all views that match that criteria. For example:
862
863       Focus on a window with the mark "IRC":
864
865           [con_mark="IRC"] focus
866
867       Kill all windows with the title "Emacs":
868
869           [class="Emacs"] kill
870
871       You may like to use swaymsg -t get_tree for finding the values of these
872       properties in practice for your applications.
873
874       The following attributes may be matched with:
875
876       app_id
877           Compare value against the app id. Can be a regular expression. If
878           value is __focused__, then the app id must be the same as that of
879           the currently focused window. app_id are specific to Wayland appli‐
880           cations.
881
882       class
883           Compare value against the window class. Can be a regular expres‐
884           sion. If value is __focused__, then the window class must be the
885           same as that of the currently focused window. class are specific to
886           X11 applications.
887
888       con_id
889           Compare against the internal container ID, which you can find via
890           IPC. If value is __focused__, then the id must be the same as that
891           of the currently focused window.
892
893       con_mark
894           Compare against the window marks. Can be a regular expression.
895
896       floating
897           Matches floating windows.
898
899       id
900           Compare value against the X11 window ID. Must be numeric.
901
902       instance
903           Compare value against the window instance. Can be a regular expres‐
904           sion. If value is __focused__, then the window instance must be the
905           same as that of the currently focused window.
906
907       pid
908           Compare value against the window's process ID. Must be numeric.
909
910       shell
911           Compare value against the window shell, such as "xdg_shell" or
912           "xwayland".  Can be a regular expression. If value is __focused__,
913           then the shell must be the same as that of the currently focused
914           window.
915
916       tiling
917           Matches tiling windows.
918
919       title
920           Compare against the window title. Can be a regular expression. If
921           value is __focused__, then the window title must be the same as
922           that of the currently focused window.
923
924       urgent
925           Compares the urgent state of the window. Can be first, last, lat‐
926           est, newest, oldest or recent.
927
928       window_role
929           Compare against the window role (WM_WINDOW_ROLE). Can be a regular
930           expression. If value is __focused__, then the window role must be
931           the same as that of the currently focused window.
932
933       window_type
934           Compare against the window type (_NET_WM_WINDOW_TYPE). Possible
935           values are normal, dialog, utility, toolbar, splash, menu, drop‐
936           down_menu, popup_menu, tooltip and notification.
937
938       workspace
939           Compare against the workspace name for this view. Can be a regular
940           expression. If the value is __focused__, then all the views on the
941           currently focused workspace matches.
942

SEE ALSO

944       sway(1) sway-input(5) sway-output(5) sway-bar(5) sway-ipc(7)
945
946
947
948                                  2020-10-22                           sway(5)
Impressum