pub struct Window(pub u64);Expand description
A toplevel window.
A toplevel window is anything that can be stored within a container tile or within a floating window.
There are currently four types of windows:
- Containers
- Placeholders that take the place of a window when it goes fullscreen
- XDG toplevels
- X windows
You can find out the type of a window by using the Window::type_ function.
Tuple Fields§
§0: u64Implementations§
Source§impl Window
impl Window
Sourcepub fn does_not_exist(self) -> bool
pub fn does_not_exist(self) -> bool
Returns whether the window does not exist.
This is a shorthand for !self.exists().
Sourcepub fn client(self) -> Client
pub fn client(self) -> Client
Returns the client of the window.
If the window does not have a client, Client::exists return false.
Sourcepub fn type_(self) -> WindowType
pub fn type_(self) -> WindowType
Returns the type of the window.
Sourcepub fn content_type(self) -> ContentType
pub fn content_type(self) -> ContentType
Returns the content type of the window.
Sourcepub fn id(self) -> String
pub fn id(self) -> String
Returns the identifier of the window.
This is the identifier used in the ext-foreign-toplevel-list-v1 protocol.
Sourcepub fn is_visible(self) -> bool
pub fn is_visible(self) -> bool
Returns whether this window is visible.
Sourcepub fn parent(self) -> Window
pub fn parent(self) -> Window
Returns the parent of this window.
If this window has no parent, Window::exists returns false.
Sourcepub fn children(self) -> Vec<Window>
pub fn children(self) -> Vec<Window>
Returns the children of this window.
Only containers have children.
Sourcepub fn set_mono(self, mono: bool)
pub fn set_mono(self, mono: bool)
Sets whether the parent-container of the window is in mono-mode.
Sourcepub fn toggle_mono(self)
pub fn toggle_mono(self)
Toggles whether the parent-container of the window is in mono-mode.
Sourcepub fn toggle_split(self)
pub fn toggle_split(self)
Toggles the split axis of the parent-container of the window.
Sourcepub fn create_split(self, axis: Axis)
pub fn create_split(self, axis: Axis)
Creates a new container with the specified split in place of the window.
Sourcepub fn set_floating(self, floating: bool)
pub fn set_floating(self, floating: bool)
Sets whether the window is floating.
Sourcepub fn toggle_floating(self)
pub fn toggle_floating(self)
Toggles whether the window is floating.
You can do the same by double-clicking on the header.
Sourcepub fn workspace(self) -> Workspace
pub fn workspace(self) -> Workspace
Returns the workspace that this window belongs to.
If no such workspace exists, exists returns false for the returned workspace.
Sourcepub fn set_workspace(self, workspace: Workspace)
pub fn set_workspace(self, workspace: Workspace)
Moves the window to the workspace.
Sourcepub fn toggle_fullscreen(self)
pub fn toggle_fullscreen(self)
Toggles whether the currently focused window is fullscreen.
Sourcepub fn fullscreen(self) -> bool
pub fn fullscreen(self) -> bool
Returns whether the window is fullscreen.
Sourcepub fn set_fullscreen(self, fullscreen: bool)
pub fn set_fullscreen(self, fullscreen: bool)
Sets whether the window is fullscreen.
Sourcepub fn float_pinned(self) -> bool
pub fn float_pinned(self) -> bool
Gets whether the window is pinned.
If a floating window is pinned, it will stay visible even when switching to a different workspace.
Sourcepub fn set_float_pinned(self, pinned: bool)
pub fn set_float_pinned(self, pinned: bool)
Sets whether the window is pinned.
Sourcepub fn toggle_float_pinned(self)
pub fn toggle_float_pinned(self)
Toggles whether the window is pinned.