Struct leftwm::Config

source ·
pub struct Config {
Show 24 fields pub modkey: String, pub mousekey: Option<Modifier>, pub workspaces: Option<Vec<Workspace>>, pub tags: Option<Vec<String>>, pub max_window_width: Option<Size>, pub layouts: Vec<String>, pub layout_definitions: Vec<Layout>, pub layout_mode: LayoutMode, pub insert_behavior: InsertBehavior, pub scratchpad: Option<Vec<ScratchPad>>, pub window_rules: Option<Vec<WindowHook>>, pub disable_current_tag_swap: bool, pub disable_tile_drag: bool, pub disable_window_snap: bool, pub focus_behaviour: FocusBehaviour, pub focus_new_windows: bool, pub single_window_border: bool, pub sloppy_mouse_follows_focus: bool, pub create_follows_cursor: Option<bool>, pub auto_derive_workspaces: bool, pub disable_cursor_reposition_on_resize: bool, pub keybind: Vec<Keybind>, pub state_path: Option<PathBuf>, pub theme_setting: ThemeSetting,
}
Expand description

General configuration

Fields§

§modkey: String§mousekey: Option<Modifier>§workspaces: Option<Vec<Workspace>>§tags: Option<Vec<String>>§max_window_width: Option<Size>§layouts: Vec<String>§layout_definitions: Vec<Layout>§layout_mode: LayoutMode§insert_behavior: InsertBehavior§scratchpad: Option<Vec<ScratchPad>>§window_rules: Option<Vec<WindowHook>>§disable_current_tag_swap: bool§disable_tile_drag: bool§disable_window_snap: bool§focus_behaviour: FocusBehaviour§focus_new_windows: bool§single_window_border: bool§sloppy_mouse_follows_focus: bool§create_follows_cursor: Option<bool>§auto_derive_workspaces: bool§disable_cursor_reposition_on_resize: bool§keybind: Vec<Keybind>§state_path: Option<PathBuf>§theme_setting: ThemeSetting

Implementations§

source§

impl Config

source

pub fn check_mousekey(&self, verbose: bool)

source

pub fn check_keybinds(&self, verbose: bool)

Check all keybinds to ensure that required values are provided Checks to see if value is provided (if required) Checks to see if keys are valid against Xkeysym Ideally, we will pass this to the command handler with a dummy config

source§

impl Config

source

pub fn clear_keybinds(&mut self)

Trait Implementations§

source§

impl Config for Config

source§

fn setup_predefined_window( &self, state: &mut State, window: &mut Window ) -> bool

Pick the best matching WindowHook, if any, and apply its config.

source§

fn create_list_of_tag_labels(&self) -> Vec<String>

source§

fn workspaces(&self) -> Option<Vec<Workspace>>

source§

fn focus_behaviour(&self) -> FocusBehaviour

source§

fn mousekey(&self) -> Vec<String>

source§

fn create_list_of_scratchpads(&self) -> Vec<ScratchPad>

source§

fn layouts(&self) -> Vec<String>

source§

fn layout_definitions(&self) -> Vec<Layout>

source§

fn layout_mode(&self) -> LayoutMode

source§

fn insert_behavior(&self) -> InsertBehavior

source§

fn single_window_border(&self) -> bool

source§

fn focus_new_windows(&self) -> bool

source§

fn command_handler<SERVER: DisplayServer>( command: &str, manager: &mut Manager<Self, SERVER> ) -> bool

source§

fn border_width(&self) -> i32

source§

fn margin(&self) -> Margins

source§

fn workspace_margin(&self) -> Option<Margins>

source§

fn gutter(&self) -> Option<Vec<Gutter>>

source§

fn default_border_color(&self) -> String

source§

fn floating_border_color(&self) -> String

source§

fn background_color(&self) -> String

source§

fn disable_window_snap(&self) -> bool

source§

fn always_float(&self) -> bool

source§

fn default_width(&self) -> i32

source§

fn default_height(&self) -> i32

source§

fn focused_border_color(&self) -> String

source§

fn on_new_window_cmd(&self) -> Option<String>

source§

fn get_list_of_gutters(&self) -> Vec<Gutter>

source§

fn disable_tile_drag(&self) -> bool

source§

fn save_state(&self, state: &State)

Attempt to write current state to a file. Read more
source§

fn load_state(&self, state: &mut State)

Load saved state if it exists.
source§

fn sloppy_mouse_follows_focus(&self) -> bool

source§

fn auto_derive_workspaces(&self) -> bool

source§

fn reposition_cursor_on_resize(&self) -> bool

source§

fn create_follows_cursor(&self) -> bool

source§

fn load_window(&self, window: &mut Window)

source§

impl Config for Config

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Config

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Configwhere Config: Default,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Config

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,