pub struct SwayOutput {
pub name: String,
pub focused: bool,
pub active: bool,
pub current_workspace: Option<String>,
pub x: i32,
pub y: i32,
pub width: u32,
pub height: u32,
pub scale: f64,
}Expand description
One of Sway’s outputs, a monitor, as GET_OUTPUTS describes it and
as Quickshell’s I3Monitor does.
Fields§
§name: StringIts name, such as DP-1.
focused: boolWhether it shows the focused workspace.
active: boolWhether it is enabled. One that isn’t has no workspace and no size.
current_workspace: Option<String>The name of the workspace it shows. None while it isn’t active.
x: i32Where its top-left corner is in the layout, in logical pixels.
y: i32See x.
width: u32Its size in logical pixels: its mode’s size divided by its scale.
height: u32See width.
scale: f64Its scale, such as 1.5. 1 for an output that isn’t active, which Sway gives -1 and SwayFX none.
Trait Implementations§
Source§impl Clone for SwayOutput
impl Clone for SwayOutput
Source§impl Debug for SwayOutput
impl Debug for SwayOutput
Source§impl<'de> Deserialize<'de> for SwayOutput
impl<'de> Deserialize<'de> for SwayOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for SwayOutput
impl PartialEq for SwayOutput
impl StructuralPartialEq for SwayOutput
Auto Trait Implementations§
impl Forget for SwayOutput
impl Freeze for SwayOutput
impl Move for SwayOutput
impl RefUnwindSafe for SwayOutput
impl Send for SwayOutput
impl Sync for SwayOutput
impl Unpin for SwayOutput
impl UnsafeUnpin for SwayOutput
impl UnwindSafe for SwayOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more