pub enum SubCommand {
Show 21 variants
Border(Border),
Exit,
Floating(EnDisTog),
Focus(Focus),
Fullscreen(EnDisTog, FullscreenGlobal),
Gaps(GapsDirection, GapsWorkspaces, GapsModification, u32),
InhibitIdle(InhibitIdle),
Layout(Layout),
MaxRenderTime(MaxRenderTime),
Move(Move),
Nop(Option<String>),
Reload,
RenameWorkspace(String, String),
RenameFocusedWorkspace(String),
Resize(Resize),
ScratchpadShow,
ShortcutsInhibitor(EnDisable),
Split(Split),
Sticky(EnDisTog),
Swap(Swap),
TitleFormat(String),
}Expand description
A command that can be called with a criteria
Variants§
Border(Border)
Set border style for focused window
Default is normal with border thickness 2.
Exit
Exit sway and end your Wayland session
Floating(EnDisTog)
Make focused view floating, non-floating, or the opposite of what it is now
Focus(Focus)
Changes focused node
Fullscreen(EnDisTog, FullscreenGlobal)
Makes focused view fullscreen, non-fullscreen, or the opposite of what it is now.
If global is specified, the view will be fullscreen across all outputs.
Gaps(GapsDirection, GapsWorkspaces, GapsModification, u32)
Changes the inner or outer gaps for either all workspaces (true) or
the current workspace (false). outer gaps can be altered per side
with top, right, bottom, and left or per direction with horizontal
and vertical.
InhibitIdle(InhibitIdle)
Set/unset an idle inhibitor for the view
This can also be used with criteria to set an idle inhibitor for any existing view or with for_window to set idle inhibitors for future views.
Layout(Layout)
Sets the layout mode of the focused container
MaxRenderTime(MaxRenderTime)
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.
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 max_render_time setting.
To set this up for optimal latency:
- Set up output max_render_time (see sway-output(5)).
- Put the target application in full-screen and have it continuously render something.
- Start by setting max_render_time 1. If the application drops frames, increment by 1.
This setting only has an effect if a per-output max_render_time is in effect on the output the window is currently on. See sway-output(5) for further details.
Move(Move)
Move a window, container or workspace
Nop(Option<String>)
A no operation command that can be used to override default behaviour. The optional comment argument is ignored, but logged for debugging purposes.
Reload
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 sway(1).
RenameWorkspace(String, String)
Rename either <old_name> workspace to the <new_name>
RenameFocusedWorkspace(String)
Rename the focused workspace to the <new_name>
Resize(Resize)
ScratchpadShow
Shows a window from the scratchpad
Repeatedly using this command will cycle through the windows in the scratchpad.
ShortcutsInhibitor(EnDisable)
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 disable additionally deactivates any active inhibitors for the given view(s). Criteria are particularly useful with the for_window command to configure a class of views differently from the per-seat defaults established by the seat subcommand of the same name. See sway-input(5) for more ways to affect inhibitors.
Split(Split)
Splits the current container, vertically or horizontally.
Sticky(EnDisTog)
“Sticks” a floating window to the current output so that it shows up on all workspaces
Swap(Swap)
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 id, con_id, or mark. id 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.
TitleFormat(String)
Sets the format of window titles. The following placeholders may be used:
%title- The title supplied by the window%app_id- The wayland app ID (applicable towaylandwindows only)%class- The X11 classname (applicable toxwaylandwindows only)%instance- The X11 instance (applicable toxwaylandwindows only)%shell- The protocol the window is using (typicallyxwaylandorxdg_shell)
This command is typically used with for_window criteria. For example:
for_window [title=“.”] title_format “%title (%app_id)”
Note that markup requires pango to be enabled via the font command.
The default format is “%title”.
Trait Implementations§
Source§impl Clone for SubCommand
impl Clone for SubCommand
Source§fn clone(&self) -> SubCommand
fn clone(&self) -> SubCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more