[−][src]Struct penrose::contrib::hooks::ClientSpawnRules
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]
pub fn clone(&self) -> ClientSpawnRules
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
&mut self,
_: &mut WindowManager<X>,
c: &mut Client
) -> Result<()>
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
pub fn startup(&mut self, wm: &mut WindowManager<X>) -> Result<()>
[src]
pub fn remove_client(
&mut self,
wm: &mut WindowManager<X>,
id: WinId
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
id: WinId
) -> Result<()>
pub fn client_added_to_workspace(
&mut self,
wm: &mut WindowManager<X>,
id: WinId,
wix: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
id: WinId,
wix: usize
) -> Result<()>
pub fn client_name_updated(
&mut self,
wm: &mut WindowManager<X>,
id: WinId,
name: &str,
is_root: bool
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
id: WinId,
name: &str,
is_root: bool
) -> Result<()>
pub fn layout_applied(
&mut self,
wm: &mut WindowManager<X>,
workspace_index: usize,
screen_index: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
workspace_index: usize,
screen_index: usize
) -> Result<()>
pub fn layout_change(
&mut self,
wm: &mut WindowManager<X>,
workspace_index: usize,
screen_index: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
workspace_index: usize,
screen_index: usize
) -> Result<()>
pub fn workspace_change(
&mut self,
wm: &mut WindowManager<X>,
previous_workspace: usize,
new_workspace: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
previous_workspace: usize,
new_workspace: usize
) -> Result<()>
pub fn workspaces_updated(
&mut self,
wm: &mut WindowManager<X>,
names: &[&str],
active: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
names: &[&str],
active: usize
) -> Result<()>
pub fn screen_change(
&mut self,
wm: &mut WindowManager<X>,
screen_index: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
screen_index: usize
) -> Result<()>
pub fn screens_updated(
&mut self,
wm: &mut WindowManager<X>,
dimensions: &[Region]
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
dimensions: &[Region]
) -> Result<()>
pub fn randr_notify(&mut self, wm: &mut WindowManager<X>) -> Result<()>
[src]
pub fn focus_change(
&mut self,
wm: &mut WindowManager<X>,
id: WinId
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
id: WinId
) -> Result<()>
pub fn event_handled(&mut self, wm: &mut WindowManager<X>) -> Result<()>
[src]
impl PartialEq<ClientSpawnRules> for ClientSpawnRules
[src]
pub fn eq(&self, other: &ClientSpawnRules) -> bool
[src]
pub fn ne(&self, other: &ClientSpawnRules) -> bool
[src]
impl StructuralEq for ClientSpawnRules
[src]
impl StructuralPartialEq for ClientSpawnRules
[src]
Auto Trait Implementations
impl RefUnwindSafe for ClientSpawnRules
[src]
impl Send for ClientSpawnRules
[src]
impl Sync for ClientSpawnRules
[src]
impl Unpin for ClientSpawnRules
[src]
impl UnwindSafe for ClientSpawnRules
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,