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

pub struct WindowManager<'a> { /* 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.

Implementations

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

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

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

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 log(&self, msg: &str)[src]

Log information out at INFO level for picking up by external programs

pub fn cycle_screen(&mut self, direction: Direction)[src]

Cycle between known screens. Does not wrap from first to last

pub fn cycle_workspace(&mut self, direction: Direction)[src]

Cycle between workspaces on the current Screen. This will pull workspaces to the screen if they are currently displayed on another screen.

pub fn drag_workspace(&mut self, direction: Direction)[src]

Move the currently focused workspace to the next Screen in 'direction'

pub fn cycle_client(&mut self, direction: Direction)[src]

Cycle between Clients for the active Workspace

pub fn drag_client(&mut self, direction: Direction)[src]

Move the focused Client through the stack of Clients on the active Workspace

pub fn cycle_layout(&mut self, direction: Direction)[src]

Cycle between Layouts for the active Workspace

pub fn update_max_main(&mut self, change: Change)[src]

Increase or decrease the number of clients in the main area by 1

pub fn update_main_ratio(&mut self, change: Change)[src]

Increase or decrease the current Layout main_ratio by main_ratio_step

pub fn exit(&mut self)[src]

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

pub fn current_layout_symbol(&self) -> &str[src]

The layout symbol for the Layout currently being used on the active workspace

pub fn set_root_window_name(&self, s: &str)[src]

Set the root X window name. Useful for exposing information to external programs

pub fn focus_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 toggle_workspace(&mut self)[src]

Switch focus back to the last workspace that had focus.

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 kill_client(&mut self)[src]

Kill the focused client window.

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.