[][src]Struct penrose::contrib::hooks::ClientSpawnRules

pub struct ClientSpawnRules { /* fields omitted */ }

Move clients with a matching WM_NAME to a target workspace when they are spawned.

The Strings used to identify the clients that should be moved are their WM_NAME and WM_CLASS X11 properties.

use penrose::contrib::hooks::{SpawnRule, ClientSpawnRules};

let my_hook = ClientSpawnRules::new(vec![
    SpawnRule::ClassName("xterm-256color" , 3),
    SpawnRule::WMName("Firefox Developer Edition" , 7),
]);

Implementations

impl ClientSpawnRules[src]

pub fn new(rules: Vec<SpawnRule<'_>>) -> Box<Self>[src]

Create a new ClientSpawnRules that is pre-boxed for adding to your workspace hooks.

Trait Implementations

impl Clone for ClientSpawnRules[src]

impl Debug for ClientSpawnRules[src]

impl Eq for ClientSpawnRules[src]

impl<X: XConn> Hook<X> for ClientSpawnRules[src]

pub fn new_client(
    &mut self,
    _: &mut WindowManager<X>,
    c: &mut Client
) -> Result<()>
[src]

This sets the client workspace to the desired value which is then picked up and trigers the spawn on that workspace in WindowManager.handle_map_request

impl PartialEq<ClientSpawnRules> for ClientSpawnRules[src]

impl StructuralEq for ClientSpawnRules[src]

impl StructuralPartialEq for ClientSpawnRules[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.