[−][src]Struct penrose::contrib::extensions::scratchpad::Scratchpad
Spawn and manage a single Client which can then be shown above the current layout.
The get_hook method must be called to pass the associated Hook to your WindowManager before calling init in order to register the necessary hooks to spawn, capture and manage the embedded client. The client is spawned when 'toggle' is called and there is no existing client, after that 'toggle' will show/hide the client on the active screen. If the client is removed, calling 'toggle' again will spawn a new client in the same way.
Implementations
impl Scratchpad
[src]
pub fn new<S>(prog: S, w: f32, h: f32) -> Scratchpad where
S: Into<String>,
[src]
S: Into<String>,
Create a new Scratchpad for holding 'prog'. 'w' and 'h' are the percentage width and height of the active screen that you want the client to take up when visible. NOTE: this function will panic if 'w' or 'h' are not within the range 0.0 - 1.0
pub fn get_hook(&self) -> Box<Self>
[src]
Construct the associated Hook for adding to the WindowManager.
NOTE: If the hook is not registered, Scratchpad will not be able to capture and manage spawned Client windows.
pub fn toggle<X: XConn>(&self) -> KeyEventHandler<X>
[src]
Show / hide the bound client. If there is no client currently, then spawn one.
Trait Implementations
impl Clone for Scratchpad
[src]
pub fn clone(&self) -> Scratchpad
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Scratchpad
[src]
impl<X: XConn> Hook<X> for Scratchpad
[src]
pub fn new_client(
&mut self,
wm: &mut WindowManager<X>,
c: &mut Client
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
c: &mut Client
) -> Result<()>
pub fn remove_client(
&mut self,
_: &mut WindowManager<X>,
id: WinId
) -> Result<()>
[src]
&mut self,
_: &mut WindowManager<X>,
id: WinId
) -> Result<()>
pub fn layout_applied(
&mut self,
wm: &mut WindowManager<X>,
_: usize,
screen_index: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
_: usize,
screen_index: usize
) -> Result<()>
pub fn startup(&mut self, wm: &mut WindowManager<X>) -> Result<()>
[src]
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_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<Scratchpad> for Scratchpad
[src]
pub fn eq(&self, other: &Scratchpad) -> bool
[src]
pub fn ne(&self, other: &Scratchpad) -> bool
[src]
impl StructuralPartialEq for Scratchpad
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Scratchpad
[src]
impl !Send for Scratchpad
[src]
impl !Sync for Scratchpad
[src]
impl Unpin for Scratchpad
[src]
impl !UnwindSafe for Scratchpad
[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>,