Node

Struct Node 

Source
pub struct Node {
Show 22 fields pub focus: Vec<i64>, pub nodes: Vec<Node>, pub floating_nodes: Vec<Node>, pub id: i64, pub name: Option<String>, pub nodetype: NodeType, pub border: NodeBorder, pub current_border_width: i32, pub layout: NodeLayout, pub percent: Option<f64>, pub rect: (i32, i32, i32, i32), pub window_rect: (i32, i32, i32, i32), pub deco_rect: (i32, i32, i32, i32), pub geometry: (i32, i32, i32, i32), pub window: Option<i32>, pub window_properties: Option<HashMap<WindowProperty, String>>, pub urgent: bool, pub focused: bool, pub marks: Vec<String>, pub sticky: bool, pub fullscreen_mode: NodeFullScreenMode, pub floating: NodeFloating,
}
Expand description

The reply to the get_tree request.

Fields§

§focus: Vec<i64>

List of child node IDs (see nodes, floating_nodes and id) in focus order. Traversing the tree by following the first entry in this array will result in eventually reaching the one node with focused set to true.

§nodes: Vec<Node>

The child nodes of this container.

§floating_nodes: Vec<Node>

The child floating nodes of this container.

§id: i64

The internal ID (actually a C pointer value) of this container. Do not make any assumptions about it. You can use it to (re-)identify and address containers when talking to i3.

§name: Option<String>

The internal name of this container. For all containers which are part of the tree structure down to the workspace contents, this is set to a nice human-readable name of the container. For containers that have an X11 window, the content is the title (_NET_WM_NAME property) of that window. For all other containers, the content is not defined (yet).

§nodetype: NodeType

Type of this container. Can be one of “root”, “output”, “con”, “floating_con”, “workspace” or “dockarea”.

§border: NodeBorder

Can be either “normal”, “none” or “1pixel”, dependending on the container’s border style.

§current_border_width: i32

Number of pixels of the border width.

§layout: NodeLayout

Can be either “splith”, “splitv”, “stacked”, “tabbed”, “dockarea” or “output”. Other values might be possible in the future, should we add new layouts.

§percent: Option<f64>

The percentage which this container takes in its parent. A value of null means that the percent property does not make sense for this container, for example for the root container.

§rect: (i32, i32, i32, i32)

The (x, y, width, height) absolute display coordinates for this container. Display coordinates means that when you have two 1600x1200 monitors on a single X11 Display (the standard way), the coordinates of the first window on the second monitor are (1600, 0, 1600, 1200).

§window_rect: (i32, i32, i32, i32)

The (x, y, width, height) coordinates of the actual client window inside its container. These coordinates are relative to the container and do not include the window decoration (which is actually rendered on the parent container). So for example, when using the default layout, you will have a 2 pixel border on each side, making the window_rect (2, 0, 632, 366).

§deco_rect: (i32, i32, i32, i32)

The (x, y, width, height) coordinates of the window decoration inside its container. These coordinates are relative to the container and do not include the actual client window.

§geometry: (i32, i32, i32, i32)

The original geometry the window specified when i3 mapped it. Used when switching a window to floating mode, for example.

§window: Option<i32>

The X11 window ID of the actual client window inside this container. This field is set to null for split containers or otherwise empty containers. This ID corresponds to what xwininfo(1) and other X11-related tools display (usually in hex).

§window_properties: Option<HashMap<WindowProperty, String>>

X11 window properties title, instance, class, window_role and transient_for.

§urgent: bool

Whether this container (window, split container, floating container or workspace) has the urgency hint set, directly or indirectly. All parent containers up until the workspace container will be marked urgent if they have at least one urgent child.

§focused: bool

Whether this container is currently focused.

§marks: Vec<String>

List of marks assigned to container

§sticky: bool

Whether this window is “sticky”. If it is also floating, this window will be present on all workspaces on the same output.

§fullscreen_mode: NodeFullScreenMode

Whether this container is in fullscreen state or not.

§floating: NodeFloating

Floating state of container. Can be either “auto_on”, “auto_off”, “user_on” or “user_off”

Trait Implementations§

Source§

impl Clone for Node

Source§

fn clone(&self) -> Node

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl UnwindSafe for Node

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.