[][src]Struct penrose::manager::WindowManager

pub struct WindowManager<'a> {
    pub workspaces: Vec<Workspace>,
    // some fields omitted
}

WindowManager is the primary struct / owner of the event loop ofr penrose. It handles most (if not all) of the communication with XCB and responds to X events served over the embedded connection. User input bindings are parsed and bound on init and then triggered via grabbed X events in the main loop along with everything else.

Fields

workspaces: Vec<Workspace>

Implementations

impl<'a> WindowManager<'a>[src]

pub fn init(conf: Config, conn: &'a dyn XConn) -> WindowManager[src]

Initialise a new window manager instance using an existing connection to the X server.

pub fn map_x_window(&mut self, win_id: WinId)[src]

pub fn grab_keys_and_run(&mut self, bindings: KeyBindings)[src]

main event loop for the window manager. Everything is driven by incoming events from the X server with each event type being mapped to a handler

pub fn exit(&mut self)[src]

Shut down the WindowManager, running any required cleanup and exiting penrose

pub fn switch_workspace(&mut self, index: usize)[src]

Set the displayed workspace for the focused screen to be index in the list of workspaces passed at init. This will panic if the index passed is out of bounds which is only possible if you manually bind an action to this with an invalid index. You should almost always be using the gen_keybindings! macro to set up your keybindings so this is not normally an issue.

pub fn client_to_workspace(&mut self, index: usize)[src]

Move the focused client to the workspace at index in the workspaces list. This will panic if you pass an index that is out of bounds.

pub fn next_client(&mut self)[src]

Move focus to the next client in the stack

pub fn previous_client(&mut self)[src]

Move focus to the previous client in the stack

pub fn kill_client(&mut self)[src]

Kill the focused client window.

pub fn next_layout(&mut self)[src]

Rearrange the windows on the focused screen using the next available layout

pub fn previous_layout(&mut self)[src]

Rearrange the windows on the focused screen using the previous layout

pub fn inc_main(&mut self)[src]

Increase the number of windows in the main layout area

pub fn dec_main(&mut self)[src]

Reduce the number of windows in the main layout area

pub fn inc_ratio(&mut self)[src]

Make the main area larger relative to sub-areas

pub fn dec_ratio(&mut self)[src]

Make the main area smaller relative to sub-areas

Auto Trait Implementations

impl<'a> !RefUnwindSafe for WindowManager<'a>

impl<'a> !Send for WindowManager<'a>

impl<'a> !Sync for WindowManager<'a>

impl<'a> Unpin for WindowManager<'a>

impl<'a> !UnwindSafe for WindowManager<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.