[−][src]Struct penrose::core::workspace::Workspace
A Workspace represents a named set of clients that are tiled according to a specific layout. Layout properties are tracked per workspace and clients are referenced by ID. Workspaces are independant of monitors and can be moved between monitors freely, bringing their clients with them.
The parent WindowManager struct tracks which client is focused from the point of view of the X server by checking focus at the Workspace level whenever a new Workspace becomes active.
Implementations
impl Workspace
[src]
pub fn new(name: impl Into<String>, layouts: Vec<Layout>) -> Workspace
[src]
Construct a new Workspace with the given name and choice of Layouts
pub fn name(&self) -> &str
[src]
The name of this workspace
pub fn len(&self) -> usize
[src]
The number of clients currently on this workspace
pub fn iter(&self) -> Iter<'_, WinId>
[src]
Iterate over the clients on this workspace in position order
pub fn iter_mut(&mut self) -> IterMut<'_, WinId>
[src]
Iterate over the clients on this workspace in position order
pub fn focused_client(&self) -> Option<WinId>
[src]
A reference to the currently focused client if there is one
pub fn add_client(&mut self, id: WinId)
[src]
Add a new client to this workspace at the top of the stack and focus it
pub fn focus_client(&mut self, id: WinId) -> Option<WinId>
[src]
Focus the client with the given id, returns an option of the previously focused client if there was one
pub fn remove_client(&mut self, id: WinId) -> Option<WinId>
[src]
Remove a target client, retaining focus at the same position in the stack. Returns the removed client if there was one to remove.
pub fn remove_focused_client(&mut self) -> Option<WinId>
[src]
Remove the currently focused client, keeping focus at the same position in the stack. Returns the removed client if there was one to remove.
pub fn try_set_layout(&mut self, symbol: &str) -> Option<&Layout>
[src]
Set the active layout by symbol name if it is available. Returns a reference to active layout if it was able to be set.
pub fn cycle_layout(&mut self, direction: Direction) -> &str
[src]
Cycle through the available layouts on this workspace
pub fn layout_symbol(&self) -> &str
[src]
The symbol of the currently used layout (passed on creation)
pub fn layout_conf(&self) -> LayoutConf
[src]
The LayoutConf of the currently active Layout. Used by the WindowManager to determine when and how the layout function should be applied.
pub fn cycle_client(&mut self, direction: Direction) -> Option<(WinId, WinId)>
[src]
Cycle focus through the clients on this workspace
pub fn drag_client(&mut self, direction: Direction) -> Option<WinId>
[src]
Drag the focused client through the stack, retaining focus
pub fn update_max_main(&mut self, change: Change)
[src]
Increase or decrease the number of possible clients in the main area of the current Layout
pub fn update_main_ratio(&mut self, change: Change, step: f32)
[src]
Increase or decrease the size of the main area for the current Layout
Trait Implementations
impl Clone for Workspace
[src]
impl Debug for Workspace
[src]
impl PartialEq<Workspace> for Workspace
[src]
impl StructuralPartialEq for Workspace
[src]
Auto Trait Implementations
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnwindSafe for Workspace
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,