[][src]Struct penrose::core::data_types::Config

pub struct Config<'a> {
    pub workspaces: Vec<&'a str>,
    pub floating_classes: &'static [&'static str],
    pub layouts: Vec<Layout>,
    pub focused_border: u32,
    pub unfocused_border: u32,
    pub border_px: u32,
    pub gap_px: u32,
    pub main_ratio_step: f32,
    pub show_bar: bool,
    pub top_bar: bool,
    pub bar_height: u32,
    pub hooks: Vec<Box<dyn Hook>>,
}

The main user facing configuration details

Fields

workspaces: Vec<&'a str>

Default workspace names to use when initialising the WindowManager. Must have at least one element.

floating_classes: &'static [&'static str]

WM_CLASS values that should always be treated as floating.

layouts: Vec<Layout>

Default Layouts to be given to every workspace.

focused_border: u32

Focused boder color

unfocused_border: u32

Unfocused boder color

border_px: u32

The width of window borders in pixels

gap_px: u32

The size of gaps between windows in pixels.

main_ratio_step: f32

The percentage change in main_ratio to be applied when increasing / decreasing.

show_bar: bool

Whether or not space should be reserved for a status bar

top_bar: bool

True if the status bar should be at the top of the screen, false if it should be at the bottom

bar_height: u32

Height of space reserved for status bars in pixels

hooks: Vec<Box<dyn Hook>>

User supplied Hooks for modifying WindowManager behaviour

Implementations

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

pub fn default() -> Config<'a>[src]

Initialise a default Config, giving sensible (but minimal) values for all fields.

pub fn ws_range(&self) -> Range<usize>[src]

Create a range from 1 -> n_workspaces for use in keybindings

Auto Trait Implementations

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

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

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

impl<'a> Unpin for Config<'a>

impl<'a> !UnwindSafe for Config<'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.