.\" Generated by scdoc 1.11.2 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "sway" "5" "2023-12-23" .P .SH NAME .P sway - configuration file and commands .P .SH DESCRIPTION .P A sway configuration file is a list of sway commands that are executed by sway on startup.\& These commands usually consist of setting your preferences and setting key bindings.\& An example config is likely present in /etc/sway/config for you to check out.\& .P Lines in the configuration file might be extended through multiple lines by adding a '\&\\'\& character at the end of line.\& e.\&g.\&: .P .nf .RS 4 bindsym Shift+XF86AudioRaiseVolume exec \\ pactl set-sink-volume @DEFAULT_SINK@ -1% .fi .RE .P Commands can also be given as a block in the form \fBcommand { }\fR.\& Anything before the opening \fB{\fR will be prepended to the lines inside the block.\& For example: .P .nf .RS 4 output eDP-1 { background ~/wallpaper\&.png fill resolution 1920x1080 } .fi .RE .P is identical to .P .nf .RS 4 output eDP-1 background ~/wallpaper\&.png fill output eDP-1 resolution 1920x1080 .fi .RE .P These commands can be executed in your config file, via \fBswaymsg\fR(1), or via the bindsym command.\& .P .SH COMMAND CONVENTIONS .P Commands are split into several arguments using spaces.\& You can enclose arguments with quotation marks (\fB".\&.\&.\&"\fR or \fB'\&.\&.\&.\&'\&\fR) to add spaces to a single argument.\& You may also run several commands in order by separating each with \fB,\fR or \fB;\fR.\& Criteria is retained across commands separated by \fB,\fR, but will be reset (and allow for new criteria, if desired) for commands separated by a \fB;\fR.\& .P Throughout the documentation, \fB|\fR is used to distinguish between arguments for which you may only select one.\& \fB[.\&.\&.\&]\fR is used for optional arguments, and \fB<.\&.\&.\&>\fR for arguments where you are expected to supply some value.\& .P .SH COMMANDS .P This section only lists general commands.\& For input and output commands, refer to \fBsway-input\fR(5) and \fBsway-output\fR(5).\& .P The following commands may only be used in the configuration file.\& .P \fBbar\fR [] .RS 4 For details on bar subcommands, see \fBsway-bar\fR(5).\& .P .RE \fBdefault_orientation\fR horizontal|vertical|auto .RS 4 Sets the default container layout for tiled containers.\& .P .RE \fBinclude\fR .RS 4 Includes another file from \fIpath\fR.\& \fIpath\fR can be either a full path or a path relative to the parent config, and expands shell syntax (see \fBwordexp\fR(3) for details).\& The same include file can only be included once; subsequent attempts will be ignored.\& .P .RE \fBswaybg_command\fR .RS 4 Executes custom background \fIcommand\fR.\& Default is \fIswaybg\fR.\& Refer to \fBsway-output\fR(5) for more information.\& .P It can be disabled by setting the command to a single dash: \fIswaybg_command -\fR .P .RE \fBswaynag_command\fR .RS 4 Executes custom command for \fIswaynag\fR.\& Default is \fIswaynag\fR.\& Additional arguments may be appended to the end.\& This should only be used to either direct sway to call swaynag from a custom path or to provide additional arguments.\& This should be placed at the top of the config for the best results.\& .P It can be disabled by setting the command to a single dash: \fIswaynag_command -\fR .P .RE \fBworkspace_layout\fR default|stacking|tabbed .RS 4 Specifies the initial layout for new containers in an empty workspace.\& .P .RE \fBxwayland\fR enable|disable|force .RS 4 Enables or disables Xwayland support, which allows X11 applications to be used.\& \fIenable\fR will lazily load Xwayland so Xwayland will not be launched until the first client attempts to connect.\& In some cases, such as slower machines, it may be desirable to have Xwayland started immediately by using \fIforce\fR instead of \fIenable\fR.\& .P .RE The following commands cannot be used directly in the configuration file.\& They are expected to be used with \fBbindsym\fR or at runtime through \fBswaymsg\fR(1).\& .P \fBborder\fR none|normal|csd|pixel [] .RS 4 Set border style for focused window.\& \fInormal\fR includes a border of thickness \fIn\fR and a title bar.\& \fIpixel\fR is a border without title bar \fIn\fR pixels thick.\& Default is \fInormal\fR with border thickness 2.\& \fIcsd\fR is short for client-side-decorations, which allows the client to draw its own decorations.\& .P .RE \fBborder\fR toggle .RS 4 Cycles through the available border styles.\& .P .RE \fBexit\fR .RS 4 Exit sway and end your Wayland session.\& .P .RE \fBfloating\fR enable|disable|toggle .RS 4 Make focused view floating, non-floating, or the opposite of what it is now.\& .P .RE \fBfocus\fR .RS 4 Moves focus to the container that matches the specified criteria.\& .P .RE \fBfocus\fR up|right|down|left .RS 4 Moves focus to the next container in the specified direction.\& .P .RE \fBfocus\fR prev|next [sibling] .RS 4 Moves focus to the previous or next container in the current layout.\& By default, the last active child of the newly focused container will be focused.\& The \fIsibling\fR option indicates not to immediately focus a child of the container.\& .P .RE \fBfocus\fR child .RS 4 Moves focus to the last-focused child of the focused container.\& .P .RE \fBfocus\fR parent .RS 4 Moves focus to the parent of the focused container.\& .P .RE \fBfocus\fR output up|right|down|left .RS 4 Moves focus to the next output in the specified direction.\& .P .RE \fBfocus\fR output .RS 4 Moves focus to the named output.\& .P .RE \fBfocus\fR tiling .RS 4 Sets focus to the last focused tiling container.\& .P .RE \fBfocus\fR floating .RS 4 Sets focus to the last focused floating container.\& .P .RE \fBfocus\fR mode_toggle .RS 4 Moves focus between the floating and tiled layers.\& .P .RE \fBfullscreen\fR [enable|disable|toggle] [global] .RS 4 Makes focused view fullscreen, non-fullscreen, or the opposite of what it is now.\& If no argument is given, it does the same as \fItoggle\fR.\& If \fIglobal\fR is specified, the view will be fullscreen across all outputs.\& .P .RE \fBgaps\fR inner|outer|horizontal|vertical|top|right|bottom|left all|current set|plus|minus|toggle .RS 4 Changes the \fIinner\fR or \fIouter\fR gaps for either \fIall\fR workspaces or the \fIcurrent\fR workspace.\& \fIouter\fR gaps can be altered per side with \fItop\fR, \fIright\fR, \fIbottom\fR, and \fIleft\fR or per direction with \fIhorizontal\fR and \fIvertical\fR.\& .P .RE \fBinhibit_idle\fR focus|fullscreen|open|none|visible .RS 4 Set/unset an idle inhibitor for the view.\& \fIfocus\fR will inhibit idle when the view is focused by any seat.\& \fIfullscreen\fR will inhibit idle when the view is fullscreen (or a descendant of a fullscreen container) and is visible.\& \fIopen\fR will inhibit idle until the view is closed (or the inhibitor is unset/changed).\& \fIvisible\fR will inhibit idle when the view is visible on any output.\& \fInone\fR will remove any existing idle inhibitor for the view.\& .P This can also be used with criteria to set an idle inhibitor for any existing view or with \fIfor_window\fR to set idle inhibitors for future views.\& .P .RE \fBlayout\fR default|splith|splitv|stacking|tabbed .RS 4 Sets the layout mode of the focused container.\& .P When using the \fIstacking\fR layout, only the focused window in the container is displayed, with the opened windows'\& list on the top of the container.\& .P The \fItabbed\fR layout is similar to \fIstacking\fR, but the windows’ list is vertically split.\& .P .RE \fBlayout\fR toggle [split|all] .RS 4 Cycles the layout mode of the focused container though a preset list of layouts.\& If no argument is given, then it cycles through stacking, tabbed and the last split layout.\& If \fIsplit\fR is given, then it cycles through splith and splitv.\& If \fIall\fR is given, then it cycles through every layout.\& .P .RE \fBlayout\fR toggle [split|tabbed|stacking|splitv|splith] [split|tabbed|stacking|splitv|splith].\&.\&.\& .RS 4 Cycles the layout mode of the focused container through a list of layouts.\& .P .RE \fBmax_render_time\fR off| .RS 4 Controls when the relevant application is told to render this window, as a positive number of milliseconds before the next time sway composites the output.\& A smaller number leads to fresher rendered frames being composited by sway and lower perceived input latency, but if set too low, the application may not finish rendering before sway composites the output, leading to delayed frames.\& .P When set to off, the relevant application is told to render this window immediately after display refresh.\& How much time is left for rendering before sway composites the output at that point depends on the output \fBmax_render_time\fR setting.\& .P To set this up for optimal latency: .RS 4 .ie n \{\ \h'-04'1.\h'+03'\c .\} .el \{\ .IP 1. 4 .\} Set up \fBoutput max_render_time\fR (see \fBsway-output\fR(5)).\& .RE .RS 4 .ie n \{\ \h'-04'2.\h'+03'\c .\} .el \{\ .IP 2. 4 .\} Put the target application in \fIfull-screen\fR and have it continuously render something.\& .RE .RS 4 .ie n \{\ \h'-04'3.\h'+03'\c .\} .el \{\ .IP 3. 4 .\} Start by setting \fBmax_render_time 1\fR.\& If the application drops frames, increment by \fB1\fR.\& .RE .P This setting only has an effect if a per-output \fBmax_render_time\fR is in effect on the output the window is currently on.\& See \fBsway-output\fR(5) for further details.\& .P .RE \fBmove\fR left|right|up|down [ px] .RS 4 Moves the focused container in the direction specified.\& The optional \fIpx\fR argument specifies how many pixels to move the container.\& If unspecified, the default is 10 pixels.\& Pixels are ignored when moving tiled containers.\& .P .RE \fBmove\fR [absolute] position [px|ppt] [px|ppt] .RS 4 Moves the focused container to the specified position in the workspace.\& The position can be specified in pixels or percentage points, omitting the unit defaults to pixels.\& If \fIabsolute\fR is used, the position is relative to all outputs.\& \fIabsolute\fR can not be used with percentage points.\& .P .RE \fBmove\fR [absolute] position center .RS 4 Moves the focused container to be centered on the workspace.\& If \fIabsolute\fR is used, it is moved to the center of all outputs.\& .P .RE \fBmove\fR position cursor|mouse|pointer .RS 4 Moves the focused container to be centered on the cursor.\& .P .RE \fBmove\fR [container|window] [to] mark .RS 4 Moves the focused container to the specified mark.\& .P .RE \fBmove\fR [--no-auto-back-and-forth] [container|window] [to] workspace [number] .RS 4 Moves the focused container to the specified workspace.\& The string \fInumber\fR is optional and is used to match a workspace with the same number, even if it has a different name.\& .P .RE \fBmove\fR [container|window] [to] workspace prev|next|current .RS 4 Moves the focused container to the previous, next or current workspace on this output, or if no workspaces remain, the previous or next output.\& .P .RE \fBmove\fR [container|window] [to] workspace prev_on_output|next_on_output .RS 4 Moves the focused container to the previous or next workspace on this output, wrapping around if already at the first or last workspace.\& .P .RE \fBmove\fR [container|window] [to] workspace back_and_forth .RS 4 Moves the focused container to previously focused workspace.\& .P .RE \fBmove\fR [container|window] [to] output |current .RS 4 Moves the focused container to the specified output.\& .P .RE \fBmove\fR [container|window] [to] output up|right|down|left .RS 4 Moves the focused container to next output in the specified direction.\& .P .RE \fBmove\fR [container|window] [to] scratchpad .RS 4 Moves the focused container to the scratchpad.\& .P .RE \fBmove\fR workspace [to] output |current .RS 4 Moves the focused workspace to the specified output.\& .P .RE \fBmove\fR workspace to [output] |current .RS 4 Moves the focused workspace to the specified output.\& .P .RE \fBmove\fR workspace [to] output up|right|down|left .RS 4 Moves the focused workspace to next output in the specified direction.\& .P .RE \fBmove\fR workspace to [output] up|right|down|left .RS 4 Moves the focused workspace to next output in the specified direction.\& .P .RE \fBnop\fR .RS 4 A no operation command that can be used to override default behaviour.\& The optional comment argument is ignored, but logged for debugging purposes.\& .P .RE \fBreload\fR .RS 4 Reloads the sway config file and applies any changes.\& The config file is located at path specified by the command line arguments when started, otherwise according to the priority stated in \fBsway\fR(1).\& .P .RE \fBrename\fR workspace [] to .RS 4 Rename either or the focused workspace to the .P .RE \fBresize\fR shrink|grow width|height [ [px|ppt]] .RS 4 Resizes the currently focused container by \fIamount\fR, specified in pixels or percentage points.\& If the units are omitted, floating containers are resized in px and tiled containers by ppt.\& \fIamount\fR will default to 10 if omitted.\& .P .RE \fBresize\fR set height [px|ppt] .RS 4 Sets the height of the container to \fIheight\fR, specified in pixels or percentage points.\& If the units are omitted, floating containers are resized in px and tiled containers by ppt.\& If \fIheight\fR is 0, the container will not be resized.\& .P .RE \fBresize\fR set [width] [px|ppt] .RS 4 Sets the width of the container to \fIwidth\fR, specified in pixels or percentage points.\& If the units are omitted, floating containers are resized in px and tiled containers by ppt.\& If \fIwidth\fR is 0, the container will not be resized.\& .P .RE \fBresize\fR set [width] [px|ppt] [height] [px|ppt] .RS 4 Sets the width and height of the container to \fIwidth\fR and \fIheight\fR, specified in pixels or percentage points.\& If the units are omitted, floating containers are resized in px and tiled containers by ppt.\& If \fIwidth\fR or \fIheight\fR is 0, the container will not be resized on that axis.\& .P .RE \fBscratchpad\fR show .RS 4 Shows a window from the scratchpad.\& Repeatedly using this command will cycle through the windows in the scratchpad.\& .P .RE \fBshortcuts_inhibitor\fR enable|disable .RS 4 Enables or disables the ability of clients to inhibit keyboard shortcuts for a view.\& This is primarily useful for virtualization and remote desktop software.\& It affects either the currently focused view or a set of views selected by criteria.\& Subcommand \fIdisable\fR additionally deactivates any active inhibitors for the given view(s).\& Criteria are particularly useful with the \fBfor_window\fR command to configure a class of views differently from the per-seat defaults established by the \fBseat\fR subcommand of the same name.\& See \fBsway-input\fR(5) for more ways to affect inhibitors.\& .P .RE \fBsplit\fR vertical|v|horizontal|h|none|n|toggle|t .RS 4 Splits the current container, vertically or horizontally.\& When \fInone\fR is specified, the effect of a previous split is undone if the current container is the only child of a split parent.\& When \fItoggle\fR is specified, the current container is split opposite to the parent container'\&s layout.\& .P .RE \fBsplith\fR .RS 4 Equivalent to \fBsplit horizontal\fR .P .RE \fBsplitv\fR .RS 4 Equivalent to \fBsplit vertical\fR .P .RE \fBsplitt\fR .RS 4 Equivalent to \fBsplit toggle\fR .P .RE \fBsticky\fR enable|disable|toggle .RS 4 "Sticks" a floating window to the current output so that it shows up on all workspaces.\& .P .RE \fBswap\fR container with id|con_id|mark .RS 4 Swaps the position, geometry, and fullscreen status of two containers.\& The first container can be selected either by criteria or focus.\& The second container can be selected by \fIid\fR, \fIcon_id\fR, or \fImark\fR.\& \fIid\fR can only be used with xwayland views.\& If the first container has focus, it will retain focus unless it is moved to a different workspace or the second container becomes fullscreen on the same workspace as the first container.\& In either of those cases, the second container will gain focus.\& .P .RE \fBtitle_format\fR .RS 4 Sets the format of window titles.\& The following placeholders may be used: .P .RS 4 %title - The title supplied by the window .br %app_id - The wayland app ID (applicable to wayland windows only) .br %class - The X11 classname (applicable to xwayland windows only) .br %instance - The X11 instance (applicable to xwayland windows only) .br %shell - The protocol the window is using (typically xwayland or .RS 4 xdg_shell) .P .RE .RE This command is typically used with \fBfor_window\fR criteria.\& For example: .P .RS 4 for_window [title=".\&"] title_format "%title (%app_id)" .P .RE Note that markup requires pango to be enabled via the \fBfont\fR command.\& .P The default format is "%title".\& .P .RE The following commands may be used either in the configuration file or at runtime.\& .P \fBassign\fR [→] [workspace] [number] .RS 4 Assigns views matching \fIcriteria\fR (see \fBCRITERIA\fR for details) to \fIworkspace\fR.\& The → (U+2192) is optional and cosmetic.\& This command is equivalent to: .P .RS 4 for_window move container to workspace .P .RE .RE \fBassign\fR [→] output left|right|up|down| .RS 4 Assigns views matching \fIcriteria\fR (see \fBCRITERIA\fR for details) to the specified output.\& The → (U+2192) is optional and cosmetic.\& This command is equivalent to: .P .RS 4 for_window move container to output .P .RE .RE \fBbindsym\fR [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] [--to-code] [--input-device=] [--no-warn] [--no-repeat] [--inhibited] [Group<1-4>+] .RS 4 Binds \fIkey combo\fR to execute the sway command \fIcommand\fR when pressed.\& You may use XKB key names here (\fBwev\fR(1) is a good tool for discovering these).\& With the flag \fI--release\fR, the command is executed when the key combo is released.\& If \fIinput-device\fR is given, the binding will only be executed for that input device and will be executed instead of any binding that is generic to all devices.\& If a group number is given, then the binding will only be available for that group.\& By default, if you overwrite a binding, swaynag will give you a warning.\& To silence this, use the \fI--no-warn\fR flag.\& .P Unless the flag \fI--locked\fR is set, the command will not be run when a screen locking program is active.\& If there is a matching binding with and without \fI--locked\fR, the one with will be preferred when locked and the one without will be preferred when unlocked.\& If there are matching bindings and one has both \fI--input-device\fR and \fI--locked\fR and the other has neither, the former will be preferred even when unlocked.\& .P Unless the flag \fI--inhibited\fR is set, the command will not be run when a keyboard shortcuts inhibitor is active for the currently focused window.\& Such inhibitors are usually requested by remote desktop and virtualization software to enable the user to send keyboard shortcuts to the remote or virtual session.\& The \fI--inhibited\fR flag allows one to define bindings which will be exempt from pass-through to such software.\& The same preference logic as for \fI--locked\fR applies.\& .P Unless the flag \fI--no-repeat\fR is set, the command will be run repeatedly when the key is held, according to the repeat settings specified in the input configuration.\& .P Bindings to keysyms are layout-dependent.\& This can be changed with the \fI--to-code\fR flag.\& In this case, the keysyms will be translated into the corresponding keycodes in the first configured layout.\& .P Mouse bindings operate on the container under the cursor instead of the container that has focus.\& Mouse buttons can either be specified in the form \fIbutton[1-9]\fR or by using the name of the event code (ex \fIBTN_LEFT\fR or \fIBTN_RIGHT\fR).\& For the former option, the buttons will be mapped to their values in X11 (1=left, 2=middle, 3=right, 4=scroll up, 5=scroll down, 6=scroll left, 7=scroll right, 8=back, 9=forward).\& For the latter option, you can find the event names using \fIlibinput debug-events\fR.\& .P The priority for matching bindings is as follows: input device, group, and locked state.\& .P \fI--whole-window\fR, \fI--border\fR, and \fI--exclude-titlebar\fR are mouse-only options which affect the region in which the mouse bindings can be triggered.\& By default, mouse bindings are only triggered when over the title bar.\& With the \fI--border\fR option, the border of the window will be included in this region.\& With the \fI--whole-window\fR option, the cursor can be anywhere over a window including the title, border, and content.\& \fI--exclude-titlebar\fR can be used in conjunction with any other option to specify that the titlebar should be excluded from the region of consideration.\& .P If \fI--whole-window\fR is given, the command can be triggered when the cursor is over an empty workspace.\& Using a mouse binding over a layer surface'\&s exclusive region is not currently possible.\& .P Example: .RE .nf .RS 4 # Execute firefox when alt, shift, and f are pressed together bindsym Mod1+Shift+f exec firefox .fi .RE .P .RS 4 \fBbindcode\fR [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] [--input-device=] [--no-warn] [--no-repeat] [--inhibited] [Group<1-4>+] is also available for binding with key/button codes instead of key/button names.\& .P .RE \fBbindswitch\fR [--locked] [--no-warn] [--reload] : .RS 4 Binds to execute the sway command \fIcommand\fR on state changes.\& Supported switches are \fIlid\fR (laptop lid) and \fItablet\fR (tablet mode) switches.\& Valid values for \fIstate\fR are \fIon\fR, \fIoff\fR and \fItoggle\fR.\& These switches are on when the device lid is shut and when tablet mode is active respectively.\& \fItoggle\fR is also supported to run a command both when the switch is toggled on or off.\& .P Unless the flag \fI--locked\fR is set, the command will not be run when a screen locking program is active.\& If there is a matching binding with and without \fI--locked\fR, the one with will be preferred when locked and the one without will be preferred when unlocked.\& .P If the \fI--reload\fR flag is given, the binding will also be executed when the config is reloaded.\& \fItoggle\fR bindings will not be executed on reload.\& The \fI--locked\fR flag will operate as normal so if the config is reloaded while locked and \fI--locked\fR is not given, the binding will not be executed.\& .P By default, if you overwrite a binding, swaynag will give you a warning.\& To silence this, use the \fI--no-warn\fR flag.\& .P Example: .RE .nf .RS 4 # Show the virtual keyboard when tablet mode is entered\&. bindswitch tablet:on busctl call --user sm\&.puri\&.OSK0 /sm/puri/OSK0 sm\&.puri\&.OSK0 SetVisible b true # Log a message when the laptop lid is opened or closed\&. bindswitch lid:toggle exec echo "Lid moved" .fi .RE .P \fBbindgesture\fR [--exact] [--input-device=] [--no-warn] [:][:directions] .RS 4 Binds \fIgesture\fR to execute the sway command \fIcommand\fR when detected.\& Currently supports the \fIhold\fR, \fIpinch\fR or \fIswipe\fR gesture.\& Optionally can be limited to bind to a certain number of \fIfingers\fR or, for a \fIpinch\fR or \fIswipe\fR gesture, to certain \fIdirections\fR.\& .P .RE .TS allbox;l l lx l c lx l c lx l c lx. T{ \fBtype\fR T} T{ \fBfingers\fR T} T{ \fBdirection\fR T} T{ hold T} T{ 1 - 5 T} T{ none T} T{ swipe T} T{ 3 - 5 T} T{ up, down, left, right T} T{ pinch T} T{ 2 - 5 T} T{ all above + inward, outward, clockwise, counterclockwise T} .TE .sp 1 .RS 4 The \fIfingers\fR can be limited to any sensible number or left empty to accept any finger counts.\& Valid directions are \fIup\fR, \fIdown\fR, \fIleft\fR and \fIright\fR, as well as \fIinward\fR, \fIoutward\fR, \fIclockwise\fR, \fIcounterclockwise\fR for the \fIpinch\fR gesture.\& Multiple directions can be combined by a plus.\& .P If a \fIinput-device\fR is given, the binding will only be executed for that input device and will be executed instead of any binding that is generic to all devices.\& By default, if you overwrite a binding, swaynag will give you a warning.\& To silence this, use the \fI--no-warn\fR flag.\& .P The \fI--exact\fR flag can be used to ensure a binding only matches when exactly all specified directions are matched and nothing more.\& If there is matching binding with \fI--exact\fR, it will be preferred.\& .P The priority for matching bindings is as follows: input device, then exact matches followed by matches with the highest number of matching directions.\& .P Gestures executed while the pointer is above a bar are not handled by sway.\& See the respective documentation, e.\&g.\& \fBbindgesture\fR in \fBsway-bar\fR(5).\& .P Example: .RE .nf .RS 4 # Allow switching between workspaces with left and right swipes bindgesture swipe:right workspace prev bindgesture swipe:left workspace next # Allow container movements by pinching them bindgesture pinch:inward+up move up bindgesture pinch:inward+down move down bindgesture pinch:inward+left move left bindgesture pinch:inward+right move right .fi .RE .P \fBclient.\&background\fR .RS 4 This command is ignored and is only present for i3 compatibility.\& .P .RE \fBclient.\&\fR [ []] .RS 4 Configures the color of window borders and title bars.\& The first three colors are required.\& When omitted \fIindicator\fR will use a sane default and \fIchild_border\fR will use the color set for \fIbackground\fR.\& Colors may be specified in hex, either as \fI#RRGGBB\fR or \fI#RRGGBBAA\fR.\& .P The available classes are: .P \fBclient.\&focused\fR .RS 4 The window that has focus.\& .P .RE \fBclient.\&focused_inactive\fR .RS 4 The most recently focused view within a container which is not focused.\& .P .RE \fBclient.\&focused_tab_title\fR .RS 4 A view that has focused descendant container.\& Tab or stack container title that is the parent of the focused container but is not directly focused.\& Defaults to focused_inactive if not specified and does not use the indicator and child_border colors.\& .P .RE \fBclient.\&placeholder\fR .RS 4 Ignored (present for i3 compatibility).\& .P .RE \fBclient.\&unfocused\fR .RS 4 A view that does not have focus.\& .P .RE \fBclient.\&urgent\fR .RS 4 A view with an urgency hint.\& \fBNote\fR: Native Wayland windows do not support urgency.\& Urgency only works for Xwayland windows.\& .P .RE The meaning of each color is: .P \fIborder\fR .RS 4 The border around the title bar.\& .P .RE \fIbackground\fR .RS 4 The background of the title bar.\& .P .RE \fItext\fR .RS 4 The text color of the title bar.\& .P .RE \fIindicator\fR .RS 4 The color used to indicate where a new view will open.\& In a tiled container, this would paint the right border of the current view if a new view would be opened to the right.\& .P .RE \fIchild_border\fR .RS 4 The border around the view itself.\& .P .RE .RE The default colors are: .P .TS allbox;c l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l. T{ \fBclass\fR T} T{ \fIborder\fR T} T{ \fIbackground\fR T} T{ \fItext\fR T} T{ \fIindicator\fR T} T{ \fIchild_border\fR T} T{ \fBbackground\fR T} T{ n/a T} T{ #ffffff T} T{ n/a T} T{ n/a T} T{ n/a T} T{ \fBfocused\fR T} T{ #4c7899 T} T{ #285577 T} T{ #ffffff T} T{ #2e9ef4 T} T{ #285577 T} T{ \fBfocused_inactive\fR T} T{ #333333 T} T{ #5f676a T} T{ #ffffff T} T{ #484e50 T} T{ #5f676a T} T{ \fBfocused_tab_title\fR T} T{ #333333 T} T{ #5f676a T} T{ #ffffff T} T{ n/a T} T{ n/a T} T{ \fBunfocused\fR T} T{ #333333 T} T{ #222222 T} T{ #888888 T} T{ #292d2e T} T{ #222222 T} T{ \fBurgent\fR T} T{ #2f343a T} T{ #900000 T} T{ #ffffff T} T{ #900000 T} T{ #900000 T} T{ \fBplaceholder\fR T} T{ #000000 T} T{ #0c0c0c T} T{ #ffffff T} T{ #000000 T} T{ #0c0c0c T} .TE .sp 1 .P \fBdefault_border\fR normal|none|pixel [] .RS 4 Set default border style for new tiled windows.\& Config reload won'\&t affect existing windows, only newly created ones after the reload.\& .P .RE \fBdefault_floating_border\fR normal|none|pixel [] .RS 4 Set default border style for new floating windows.\& This only applies to windows that are spawned in floating mode, not windows that become floating afterwards.\& .P .RE \fBexec\fR .RS 4 Executes \fIshell command\fR with sh.\& .P .RE \fBexec_always\fR .RS 4 Like \fBexec\fR, but the shell command will be executed \fIagain\fR after \fBreload\fR.\& .P .RE \fBfloating_maximum_size\fR x .RS 4 Specifies the maximum size of floating windows.\& -1 x -1 removes the upper limit.\& The default is 0 x 0, which will use the width and height of the entire output layout as the maximums .P .RE \fBfloating_minimum_size\fR x .RS 4 Specifies the minimum size of floating windows.\& The default is 75 x 50.\& .P .RE \fBfloating_modifier\fR [normal|inverse] .RS 4 When the \fImodifier\fR key is held down, you may hold left click to move windows, and right click to resize them.\& Setting \fImodifier\fR to \fInone\fR disables this feature.\& If \fIinverse\fR is specified, left click is used for resizing and right click for moving.\& .P .RE \fBfocus_follows_mouse\fR yes|no|always .RS 4 If set to \fIyes\fR, moving your mouse over a window will focus that window.\& If set to \fIalways\fR, the window under the cursor will always be focused, even after switching between workspaces.\& .P .RE \fBfocus_on_window_activation\fR smart|urgent|focus|none .RS 4 This option determines what to do when a client requests window activation.\& If set to \fIurgent\fR, the urgent state will be set for that window.\& If set to \fIfocus\fR, the window will become focused.\& If set to \fIsmart\fR, the window will become focused only if it is already visible, otherwise the urgent state will be set.\& Default is \fIurgent\fR.\& .P .RE \fBfocus_wrapping\fR yes|no|force|workspace .RS 4 This option determines what to do when attempting to focus over the edge of a container.\& If set to \fIno\fR, the focused container will retain focus, if there are no other containers in the direction.\& If set to \fIyes\fR, focus will be wrapped to the opposite edge of the container, if there are no other containers in the direction.\& If set to \fIforce\fR, focus will be wrapped to the opposite edge of the container, even if there are other containers in the direction.\& If set to \fIworkspace\fR, focus will wrap like in the \fIyes\fR case and additionally wrap when moving outside of workspaces boundaries.\& Default is \fIyes\fR.\& .P .RE \fBfont\fR [pango:] .RS 4 Sets font to use for the title bars.\& To enable support for pango markup, preface the font name with \fIpango:\fR.\& For example, \fImonospace 10\fR is the default font.\& To enable support for pango markup, \fIpango:monospace 10\fR should be used instead.\& Regardless of whether pango markup is enabled, \fIfont\fR should be specified as a pango font description.\& For more information on pango font descriptions, see https://docs.\>k.\&org/Pango/type_func.\&FontDescription.\&from_string.\&html#description .P .RE \fBforce_display_urgency_hint\fR [ms] .RS 4 If an application on another workspace sets an urgency hint, switching to this workspace may lead to immediate focus of the application, which also means the window decoration color would be immediately reset to \fBclient.\&focused\fR.\& This may make it unnecessarily hard to tell which window originally raised the event.\& This option allows one to set a \fItimeout\fR in ms to delay the urgency hint reset.\& .P .RE \fBtitlebar_border_thickness\fR .RS 4 Thickness of the titlebar border in pixels .P .RE \fBtitlebar_padding\fR [] .RS 4 Padding of the text in the titlebar.\& \fIhorizontal\fR value affects horizontal padding of the text while \fIvertical\fR value affects vertical padding (space above and below text).\& Padding includes titlebar borders so their value should be greater than titlebar_border_thickness.\& If \fIvertical\fR value is not specified it is set to the \fIhorizontal\fR value.\& .P .RE \fBfor_window\fR .RS 4 Whenever a window that matches \fIcriteria\fR appears, run list of commands.\& See \fBCRITERIA\fR for more details.\& .P .RE \fBgaps\fR inner|outer|horizontal|vertical|top|right|bottom|left .RS 4 Sets default \fIamount\fR pixels of \fIinner\fR or \fIouter\fR gap, where the inner affects spacing around each view and outer affects the spacing around each workspace.\& Outer gaps are in addition to inner gaps.\& To reduce or remove outer gaps, outer gaps can be set to a negative value.\& \fIouter\fR gaps can also be specified per side with \fItop\fR, \fIright\fR, \fIbottom\fR, and \fIleft\fR or per direction with \fIhorizontal\fR and \fIvertical\fR.\& .P This affects new workspaces only, and is used when the workspace doesn'\&t have its own gaps settings (see: workspace gaps .\&.\&.\&).\& .P .RE \fBhide_edge_borders\fR [--i3] none|vertical|horizontal|both|smart|smart_no_gaps .RS 4 Hides window borders adjacent to the screen edges.\& Default is \fInone\fR.\& The \fI--i3\fR option enables i3-compatible behavior to hide the title bar on tabbed and stacked containers with one child.\& The \fIsmart\fR|\fIsmart_no_gaps\fR options are equivalent to setting \fIsmart_borders\fR smart|no_gaps and \fIhide_edge_borders\fR none.\& .P .RE \fBinput\fR .RS 4 For details on input subcommands, see \fBsway-input\fR(5).\& .P * may be used in lieu of a specific device name to configure all input devices.\& A list of input device names may be obtained via \fBswaymsg -t get_inputs\fR.\& .P .RE \fBseat\fR .RS 4 For details on seat subcommands, see \fBsway-input\fR(5).\& .P .RE \fBkill\fR .RS 4 Kills (closes) the currently focused container and all of its children.\& .P .RE \fBsmart_borders\fR on|no_gaps|off .RS 4 If smart_borders are \fIon\fR, borders will only be enabled if the workspace has more than one visible child.\& If smart_borders is set to \fIno_gaps\fR, borders will only be enabled if the workspace has more than one visible child and gaps equal to zero.\& .P .RE \fBsmart_gaps\fR on|off|toggle|inverse_outer .RS 4 If smart_gaps are \fIon\fR gaps will only be enabled if a workspace has more than one child.\& If smart_gaps are \fIinverse_outer\fR outer gaps will only be enabled if a workspace has exactly one child.\& .P .RE \fBmark\fR --add|--replace [--toggle] .RS 4 Marks are arbitrary labels that can be used to identify certain windows and then jump to them at a later time.\& Each \fIidentifier\fR can only be set on a single window at a time since they act as a unique identifier.\& By default, \fBmark\fR sets \fIidentifier\fR as the only mark on a window.\& \fI--add\fR will instead add \fIidentifier\fR to the list of current marks for that window.\& If \fI--toggle\fR is specified mark will remove \fIidentifier\fR if it is already marked.\& .P .RE \fBmode\fR .RS 4 Switches to the specified mode.\& The default mode is \fIdefault\fR.\& .P .RE \fBmode\fR [--pango_markup] .RS 4 The only valid \fImode-subcommands.\&.\&.\&\fR are \fBbindsym\fR, \fBbindcode\fR, \fBbindswitch\fR, and \fBset\fR.\& If \fI--pango_markup\fR is given, then \fImode\fR will be interpreted as pango markup.\& .P .RE \fBmouse_warping\fR output|container|none .RS 4 If \fIoutput\fR is specified, the mouse will be moved to new outputs as you move focus between them.\& If \fIcontainer\fR is specified, the mouse will be moved to the middle of the container on switch.\& Default is \fIoutput\fR.\& .P .RE \fBno_focus\fR .RS 4 Prevents windows matching from being focused automatically when they'\&re created.\& This has no effect on the first window in a workspace.\& .P .RE \fBoutput\fR .RS 4 For details on output subcommands, see \fBsway-output\fR(5).\& .P * may be used in lieu of a specific output name to configure all outputs.\& A list of output names may be obtained via \fBswaymsg -t get_outputs\fR.\& .P .RE \fBpopup_during_fullscreen\fR smart|ignore|leave_fullscreen .RS 4 Determines what to do when a fullscreen view opens a dialog.\& If \fIsmart\fR (the default), the dialog will be displayed.\& If \fIignore\fR, the dialog will not be rendered.\& If \fIleave_fullscreen\fR, the view will exit fullscreen mode and the dialog will be rendered.\& .P .RE \fBprimary_selection\fR enabled|disabled .RS 4 Enable or disable the primary selection clipboard.\& May only be configured at launch.\& Default is \fIenabled\fR.\& .P .RE \fBset\fR $ .RS 4 Sets variable $\fIname\fR to \fIvalue\fR.\& You can use the new variable in the arguments of future commands.\& When the variable is used, it can be escaped with an additional $ (ie $$\fIname\fR) to have the replacement happen at run time instead of when reading the config.\& However, it does not always make sense for the variable to be replaced at run time since some arguments do need to be known at config time.\& .P .RE \fBshow_marks\fR yes|no .RS 4 If \fBshow_marks\fR is yes, marks will be displayed in the window borders.\& Any mark that starts with an underscore will not be drawn even if \fBshow_marks\fR is yes.\& The default is \fIyes\fR.\& .P .RE \fBopacity\fR [set|plus|minus] .RS 4 Adjusts the opacity of the window between 0 (completely transparent) and 1 (completely opaque).\& If the operation is omitted, \fIset\fR will be used.\& .P .RE \fBtiling_drag\fR enable|disable|toggle .RS 4 Sets whether or not tiling containers can be dragged with the mouse.\& If \fIenabled\fR (default), the \fIfloating_mod\fR can be used to drag tiling, as well as floating, containers.\& Using the left mouse button on title bars without the \fIfloating_mod\fR will also allow the container to be dragged.\& \fItoggle\fR should not be used in the config file.\& .P .RE \fBtiling_drag_threshold\fR .RS 4 Sets the threshold that must be exceeded for a container to be dragged by its titlebar.\& This has no effect if \fIfloating_mod\fR is used or if \fItiling_drag\fR is set to \fIdisable\fR.\& Once the threshold has been exceeded once, the drag starts and the cursor can come back inside the threshold without stopping the drag.\& \fIthreshold\fR is multiplied by the scale of the output that the cursor on.\& The default is 9.\& .P .RE \fBtitle_align\fR left|center|right .RS 4 Sets the title alignment.\& If \fIright\fR is selected and \fIshow_marks\fR is set to \fIyes\fR, the marks will be shown on the \fIleft\fR side instead of the \fIright\fR side.\& .P .RE \fBunbindswitch\fR : .RS 4 Removes a binding for when changes to .\& .P .RE \fBunbindgesture\fR [--exact] [--input-device=] [:][:directions] .RS 4 Removes a binding for the specified \fIgesture\fR, \fIfingers\fR and \fIdirections\fR combination.\& .P .RE \fBunbindsym\fR [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] [--to-code] [--input-device=] .RS 4 Removes the binding for \fIkey combo\fR that was previously bound with the given flags.\& If \fIinput-device\fR is given, only the binding for that input device will be unbound.\& .P \fBunbindcode\fR [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] [--input-device=] is also available for unbinding with key/button codes instead of key/button names.\& .P .RE \fBunmark\fR [] .RS 4 \fBunmark\fR will remove \fIidentifier\fR from the list of current marks on a window.\& If \fIidentifier\fR is omitted, all marks are removed.\& .P .RE \fBurgent\fR enable|disable|allow|deny .RS 4 Using \fIenable\fR or \fIdisable\fR manually sets or unsets the window'\&s urgent state.\& Using \fIallow\fR or \fIdeny\fR controls the window'\&s ability to set itself as urgent.\& By default, windows are allowed to set their own urgency.\& .P .RE \fBworkspace\fR [--no-auto-back-and-forth] [number] <[num:]name> .RS 4 Switches to the specified workspace.\& The \fInum:\fR portion of the name is optional and will be used for ordering.\& If \fInum:\fR is not given and \fIname\fR is a number, then it will be also be used for ordering.\& .P If the \fIno-auto-back-and-forth\fR option is given, then this command will not perform a back-and-forth operation when the workspace is already focused and \fIworkspace_auto_back_and_forth\fR is enabled.\& .P If the \fInumber\fR keyword is specified and a workspace with the number already exists, then the workspace with the number will be used.\& If a workspace with the number does not exist, a new workspace will be created with the name \fIname\fR.\& .P .RE \fBworkspace\fR prev|next .RS 4 Switches to the next workspace on the current output or on the next output if currently on the last workspace.\& .P .RE \fBworkspace\fR prev_on_output|next_on_output .RS 4 Switches to the next workspace on the current output.\& .P .RE \fBworkspace\fR back_and_forth .RS 4 Switches to the previously focused workspace.\& .P .RE \fBworkspace\fR gaps inner|outer|horizontal|vertical|top|right|bottom|left .RS 4 Specifies that workspace \fIname\fR should have the given gaps settings when it is created.\& .P This command does not affect existing workspaces.\& To alter the gaps of an existing workspace, use the \fIgaps\fR command.\& .P .RE \fBworkspace\fR output .RS 4 Specifies that workspace \fIname\fR should be shown on the specified \fIoutputs\fR.\& Multiple outputs can be listed and the first available will be used.\& If the workspace gets placed on an output further down the list and an output that is higher on the list becomes available, the workspace will be moved to the higher priority output.\& .P This command does not affect existing workspaces.\& To move an existing workspace, use the \fImove\fR command in combination with the \fIworkspace\fR criteria (non-empty workspaces only) or \fIworkspace\fR command (to switch to the workspace before moving).\& .P .RE \fBworkspace_auto_back_and_forth\fR yes|no .RS 4 When \fIyes\fR, repeating a workspace switch command will switch back to the prior workspace.\& For example, if you are currently on workspace 1, switch to workspace 2, then invoke the \fBworkspace 2\fR command again, you will be returned to workspace 1.\& Default is \fIno\fR.\& .P .RE .SH CRITERIA .P A criteria is a string in the form of, for example: .P .nf .RS 4 [class="[Rr]egex\&.*" title="some title"] .fi .RE .P The string contains one or more (space separated) attribute/value pairs.\& They are used by some commands to choose which views to execute actions on.\& All attributes must match for the criteria to match.\& Criteria is retained across commands separated by a \fB,\fR, but will be reset (and allow for new criteria, if desired) for commands separated by a \fB;\fR.\& .P Criteria may be used with either the \fBfor_window\fR or \fBassign\fR commands to specify operations to perform on new views.\& A criteria may also be used to perform specific commands (ones that normally act upon one window) on all views that match that criteria.\& For example: .P Focus on a window with the mark "IRC": .P .nf .RS 4 [con_mark="IRC"] focus .fi .RE .P Kill all windows with the title "Emacs": .P .nf .RS 4 [class="Emacs"] kill .fi .RE .P You may like to use swaymsg -t get_tree for finding the values of these properties in practice for your applications.\& .P The following attributes may be matched with: .P \fBall\fR .RS 4 Matches all windows.\& .P .RE \fBapp_id\fR .RS 4 Compare value against the app id.\& Can be a regular expression.\& If value is __focused__, then the app id must be the same as that of the currently focused window.\& \fIapp_id\fR are specific to Wayland applications.\& .P .RE \fBclass\fR .RS 4 Compare value against the window class.\& Can be a regular expression.\& If value is __focused__, then the window class must be the same as that of the currently focused window.\& \fIclass\fR are specific to X11 applications and require XWayland.\& .P .RE \fBcon_id\fR .RS 4 Compare against the internal container ID, which you can find via IPC.\& If value is __focused__, then the id must be the same as that of the currently focused window.\& .P .RE \fBcon_mark\fR .RS 4 Compare against the window marks.\& Can be a regular expression.\& .P .RE \fBfloating\fR .RS 4 Matches floating windows.\& .P .RE \fBid\fR .RS 4 Compare value against the X11 window ID.\& Must be numeric.\& id is specific to X11 applications and requires XWayland.\& .P .RE \fBinstance\fR .RS 4 Compare value against the window instance.\& Can be a regular expression.\& If value is __focused__, then the window instance must be the same as that of the currently focused window.\& instance is specific to X11 applications and requires XWayland.\& .P .RE \fBpid\fR .RS 4 Compare value against the window'\&s process ID.\& Must be numeric.\& .P .RE \fBshell\fR .RS 4 Compare value against the window shell, such as "xdg_shell" or "xwayland".\& Can be a regular expression.\& If value is __focused__, then the shell must be the same as that of the currently focused window.\& .P .RE \fBtiling\fR .RS 4 Matches tiling windows.\& .P .RE \fBtitle\fR .RS 4 Compare against the window title.\& Can be a regular expression.\& If value is __focused__, then the window title must be the same as that of the currently focused window.\& .P .RE \fBurgent\fR .RS 4 Compares the urgent state of the window.\& Can be \fIfirst\fR, \fIlast\fR, \fIlatest\fR, \fInewest\fR, \fIoldest\fR or \fIrecent\fR.\& .P .RE \fBwindow_role\fR .RS 4 Compare against the window role (WM_WINDOW_ROLE).\& Can be a regular expression.\& If value is __focused__, then the window role must be the same as that of the currently focused window.\& window_role is specific to X11 applications and requires XWayland.\& .P .RE \fBwindow_type\fR .RS 4 Compare against the window type (_NET_WM_WINDOW_TYPE).\& Possible values are normal, dialog, utility, toolbar, splash, menu, dropdown_menu, popup_menu, tooltip and notification.\& window_type is specific to X11 applications and requires XWayland.\& .P .RE \fBworkspace\fR .RS 4 Compare against the workspace name for this view.\& Can be a regular expression.\& If the value is __focused__, then all the views on the currently focused workspace matches.\& .P .RE .SH SEE ALSO .P \fBsway\fR(1) \fBsway-input\fR(5) \fBsway-output\fR(5) \fBsway-bar\fR(5) \fBsway-ipc\fR(7)