pub struct Sway { /* private fields */ }Expand description
The Sway service, from cx.sway(). A clone is cheap and shares the
one connection.
Implementations§
Source§impl Sway
impl Sway
Sourcepub fn workspaces(&self) -> ReadSignal<Vec<Workspace>>
pub fn workspaces(&self) -> ReadSignal<Vec<Workspace>>
Every workspace on every output, in Sway’s order. Empty while Sway isn’t connected.
Sourcepub fn changed_at(&self) -> Option<Instant>
pub fn changed_at(&self) -> Option<Instant>
When the workspace event that led to the current list arrived, so
the shell can log how long a switch took to reach the screen.
None for a list that followed no event, such as the first.
Sourcepub fn focus_workspace(&self, name: &str)
pub fn focus_workspace(&self, name: &str)
Switches to the workspace called name, as clicking it in swaybar
does. A name Sway reads as a keyword, such as next, is logged and
not sent, and so is a call while Sway isn’t connected. Sway’s
refusal is logged too.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Sway
impl !Send for Sway
impl !Sync for Sway
impl !UnwindSafe for Sway
impl Forget for Sway
impl Freeze for Sway
impl Move for Sway
impl Unpin for Sway
impl UnsafeUnpin for Sway
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more