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

CRITERIA

935       A criteria is a string in the form of, for example:
936
937           [class="[Rr]egex.*" title="some title"]
938
939       The string contains one or more (space separated) attribute/value
940       pairs. They are used by some commands to choose which views to execute
941       actions on. All attributes must match for the criteria to match. Crite‐
942       ria is retained across commands separated by a ,, but will be reset
943       (and allow for new criteria, if desired) for commands separated by a ;.
944
945       Criteria may be used with either the for_window or assign commands to
946       specify operations to perform on new views. A criteria may also be used
947       to perform specific commands (ones that normally act upon one window)
948       on all views that match that criteria. For example:
949
950       Focus on a window with the mark "IRC":
951
952           [con_mark="IRC"] focus
953
954       Kill all windows with the title "Emacs":
955
956           [class="Emacs"] kill
957
958       You may like to use swaymsg -t get_tree for finding the values of these
959       properties in practice for your applications.
960
961       The following attributes may be matched with:
962
963       app_id
964           Compare value against the app id. Can be a regular expression. If
965           value is __focused__, then the app id must be the same as that of
966           the currently focused window. app_id are specific to Wayland appli‐
967           cations.
968
969       class
970           Compare value against the window class. Can be a regular expres‐
971           sion. If value is __focused__, then the window class must be the
972           same as that of the currently focused window. class are specific to
973           X11 applications and require XWayland.
974
975       con_id
976           Compare against the internal container ID, which you can find via
977           IPC. If value is __focused__, then the id must be the same as that
978           of the currently focused window.
979
980       con_mark
981           Compare against the window marks. Can be a regular expression.
982
983       floating
984           Matches floating windows.
985
986       id
987           Compare value against the X11 window ID. Must be numeric. id is
988           specific to X11 applications and requires XWayland.
989
990       instance
991           Compare value against the window instance. Can be a regular expres‐
992           sion. If value is __focused__, then the window instance must be the
993           same as that of the currently focused window. instance is specific
994           to X11 applications and requires XWayland.
995
996       pid
997           Compare value against the window's process ID. Must be numeric.
998
999       shell
1000           Compare value against the window shell, such as "xdg_shell" or
1001           "xwayland". Can be a regular expression. If value is __focused__,
1002           then the shell must be the same as that of the currently focused
1003           window.
1004
1005       tiling
1006           Matches tiling windows.
1007
1008       title
1009           Compare against the window title. Can be a regular expression. If
1010           value is __focused__, then the window title must be the same as
1011           that of the currently focused window.
1012
1013       urgent
1014           Compares the urgent state of the window. Can be first, last, lat‐
1015           est, newest, oldest or recent.
1016
1017       window_role
1018           Compare against the window role (WM_WINDOW_ROLE). Can be a regular
1019           expression. If value is __focused__, then the window role must be
1020           the same as that of the currently focused window. window_role is
1021           specific to X11 applications and requires XWayland.
1022
1023       window_type
1024           Compare against the window type (_NET_WM_WINDOW_TYPE). Possible
1025           values are normal, dialog, utility, toolbar, splash, menu, drop‐
1026           down_menu, popup_menu, tooltip and notification. window_type is
1027           specific to X11 applications and requires XWayland.
1028
1029       workspace
1030           Compare against the workspace name for this view. Can be a regular
1031           expression. If the value is __focused__, then all the views on the
1032           currently focused workspace matches.
1033

SEE ALSO

1035       sway(1) sway-input(5) sway-output(5) sway-bar(5) sway-ipc(7)
1036
1037
1038
1039                                  2023-02-12                           sway(5)
Impressum