pub struct WinOpt { /* private fields */ }
Expand description

Window option provides an ergonomic way to manipulate a window

Implementations

Create a new window option with the given optional window.

Arguments
  • win - id of the window to manipulate else the active window will be used
Examples
use libwmctl::prelude::*;
let win = WinOpt::new(None);

Set the width and height the window should be. This option takes priority over and will set the shape option to None.

Arguments
  • w - width the window should be
  • h - height the window should be
Examples
use libwmctl::prelude::*;
let win = WinOpt::new(None).size(500, 500);

Set the x, y location the window should be. This option takes priority over and will set the position option to None.

Arguments
  • x - x coordinate the window moved to
  • y - y coordinate the window moved to
Examples
use libwmctl::prelude::*;
let win = WinOpt::new(None).location(0, 0);

Set the shape the window should be. This option will not be set unless the width and height options are None.

Arguments
  • shape - pre-defined shape to manipulate the window into
Examples
use libwmctl::prelude::*;
let win = WinOpt::new(None).shape(WinShape::Large);

Set the position the window should be. This option will not be set unless the x and y opitons are None.

Arguments
  • pos - pre-defined position to move the window to
Examples
use libwmctl::prelude::*;
let win = WinOpt::new(None).pos(WinPosition::Right);

Place the window according to the specified options

Examples
use libwmctl::prelude::*;
let win = WinOpt::new(None).shape(WinShape::Large).pos(WinPosition::Right);

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

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

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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