Enum swayr::cmds::SwayrCommand

source ·
pub enum SwayrCommand {
Show 42 variants Nop, SwitchToUrgentOrLRUWindow { skip_flags: SkipFlags, }, SwitchToAppOrUrgentOrLRUWindow { name: String, skip_flags: SkipFlags, }, SwitchToMarkOrUrgentOrLRUWindow { con_mark: String, skip_flags: SkipFlags, }, SwitchToMatchingOrUrgentOrLRUWindow { criteria: String, skip_flags: SkipFlags, }, SwitchWindow, StealWindow, StealWindowOrContainer, SwitchWorkspace, SwitchOutput, SwitchWorkspaceOrWindow, SwitchWorkspaceContainerOrWindow, SwitchTo, QuitWindow { kill: bool, }, QuitWorkspaceOrWindow, QuitWorkspaceContainerOrWindow, NextWindow { windows: ConsiderWindows, }, PrevWindow { windows: ConsiderWindows, }, NextTiledWindow { windows: ConsiderWindows, }, PrevTiledWindow { windows: ConsiderWindows, }, NextTabbedOrStackedWindow { windows: ConsiderWindows, }, PrevTabbedOrStackedWindow { windows: ConsiderWindows, }, NextFloatingWindow { windows: ConsiderWindows, }, PrevFloatingWindow { windows: ConsiderWindows, }, NextWindowOfSameLayout { windows: ConsiderWindows, }, PrevWindowOfSameLayout { windows: ConsiderWindows, }, NextMatchingWindow { criteria: String, }, PrevMatchingWindow { criteria: String, }, MoveFocusedToWorkspace, MoveFocusedTo, SwapFocusedWith, ToggleTabShuffleTileWorkspace { floating: ConsiderFloating, }, TileWorkspace { floating: ConsiderFloating, }, TabWorkspace { floating: ConsiderFloating, }, ShuffleTileWorkspace { floating: ConsiderFloating, }, ExecuteSwaymsgCommand, ExecuteSwayrCommand, ConfigureOutputs, GetWindowsAsJson { include_scratchpad: bool, criteria: Option<String>, error_if_no_match: bool, }, ForEachWindow { include_scratchpad: bool, error_if_no_match: bool, criteria: String, shell_command: Vec<String>, }, PrintConfig, PrintDefaultConfig,
}

Variants§

§

Nop

No-operation. Interrupts any in-progress prev/next sequence but has no other effect

§

SwitchToUrgentOrLRUWindow

Fields

§skip_flags: SkipFlags

Switch to next urgent window (if any) or to last recently used window.

§

SwitchToAppOrUrgentOrLRUWindow

Fields

§name: String

The app_id or window class of the windows to switch to. Compared literally, i.e., not a regex.

§skip_flags: SkipFlags

Switch to the given app (given by app_id or window class) if that’s not focused already. If it is, switch to the next urgent window (if any) or to last recently used window.

For example, you can provide “firefox” as argument to this command to have a convenient firefox <-> last-recently-used window toggle.

§

SwitchToMarkOrUrgentOrLRUWindow

Fields

§con_mark: String

The con_mark to switch to.

§skip_flags: SkipFlags

Switch to the window with the given mark if that’s not focused already. If it is, switch to the next urgent window (if any) or to last recently used window.

For example, you can assign a “browser” mark to your browser window (using a standard sway for_window rule). Then you can provide “browser” as argument to this command to have a convenient browser <-> last-recently-used window toggle.

§

SwitchToMatchingOrUrgentOrLRUWindow

Fields

§criteria: String

The criteria query defining which windows to switch to.

§skip_flags: SkipFlags

Switch to the (first) window matching the given criteria (see section CRITERIA in sway(5)) if it exists and is not already focused. Otherwise, switch to the next urgent window (if any) or to the last recently used window.

§

SwitchWindow

Focus the selected window.

§

StealWindow

Steal the selected window from another workspace into the current workspace.

§

StealWindowOrContainer

Steal the selected window or container from another workspace into the current workspace.

§

SwitchWorkspace

Switch to the selected workspace.

§

SwitchOutput

Switch to the selected output.

§

SwitchWorkspaceOrWindow

Switch to the selected workspace or focus the selected window.

§

SwitchWorkspaceContainerOrWindow

Switch to the selected workspace or focus the selected container, or window.

§

SwitchTo

Switch to the selected output or workspace or focus the selected container, or window.

§

QuitWindow

Fields

§kill: bool

Quit the selected window.

§

QuitWorkspaceOrWindow

Quit all windows of selected workspace or the selected window.

§

QuitWorkspaceContainerOrWindow

Quit all windows of selected workspace, or container or the selected window.

§

NextWindow

Fields

Focus the next window in LRU order.

§

PrevWindow

Fields

Focus the previous window in LRU order.

§

NextTiledWindow

Fields

Focus the next window of a tiled container.

§

PrevTiledWindow

Fields

Focus the previous window of a tiled container.

§

NextTabbedOrStackedWindow

Fields

Focus the next window of a tabbed or stacked container.

§

PrevTabbedOrStackedWindow

Fields

Focus the previous window of a tabbed or stacked container.

§

NextFloatingWindow

Fields

Focus the next floating window.

§

PrevFloatingWindow

Fields

Focus the previous floating window.

§

NextWindowOfSameLayout

Fields

Focus the next window having the same layout as the current one.

§

PrevWindowOfSameLayout

Fields

Focus the previous window having the same layout as the current one.

§

NextMatchingWindow

Fields

§criteria: String

The criteria query defining which windows to switch to.

Focus the next window matching the given criteria query.

§

PrevMatchingWindow

Fields

§criteria: String

The criteria query defining which windows to switch to.

Focus the previous window matching the given criteria query.

§

MoveFocusedToWorkspace

Move the currently focused window or container to the selected workspace.

§

MoveFocusedTo

Move the currently focused window or container to the selected output, workspace, container or window.

§

SwapFocusedWith

Swap the currently focused window or container with the selected container or window.

§

ToggleTabShuffleTileWorkspace

Fields

Tab or shuffle-and-tile the windows on the current workspace, including or excluding floating windows.

§

TileWorkspace

Fields

Tiles the windows on the current workspace, including or excluding floating windows.

§

TabWorkspace

Fields

Tabs the windows on the current workspace, including or excluding floating windows.

§

ShuffleTileWorkspace

Fields

Shuffles and tiles the windows on the current workspace, including or excluding floating windows.

§

ExecuteSwaymsgCommand

Select and execute a swaymsg command.

§

ExecuteSwayrCommand

Select and execute a swayr command.

§

ConfigureOutputs

Configure outputs.

§

GetWindowsAsJson

Fields

§include_scratchpad: bool
§criteria: Option<String>
§error_if_no_match: bool

Returns a JSON array of all sway nodes being actual application windows with some extra properties not present in sway IPC (swayr_icon, swayr_type).

§

ForEachWindow

Fields

§include_scratchpad: bool
§error_if_no_match: bool
§criteria: String
§shell_command: Vec<String>

Executes a shell command for each matching window.

§

PrintConfig

Print the current effective swayr configuration (without default values).

§

PrintDefaultConfig

Prints the default swayr configuration.

Trait Implementations§

source§

impl Clone for SwayrCommand

source§

fn clone(&self) -> SwayrCommand

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CommandFactory for SwayrCommand

source§

fn command<'b>() -> Command

Build a [Command] that can instantiate Self. Read more
source§

fn command_for_update<'b>() -> Command

Build a [Command] that can update self. Read more
source§

impl Debug for SwayrCommand

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SwayrCommand

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl DisplayFormat for SwayrCommand

source§

impl FromArgMatches for SwayrCommand

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Parser for SwayrCommand

§

fn parse() -> Self

Parse from std::env::args_os(), exit on error
§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error
§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error
§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.
source§

impl PartialEq for SwayrCommand

source§

fn eq(&self, other: &SwayrCommand) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SwayrCommand

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Subcommand for SwayrCommand

source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self. Read more
source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can update self. Read more
source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand
source§

impl Eq for SwayrCommand

source§

impl StructuralEq for SwayrCommand

source§

impl StructuralPartialEq for SwayrCommand

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,