Module data

Expand description

This module provides functions for getting information on the compositor

§Data module

This module provides functions for getting information on the compositor

§Usage

here is a example of every function in use! (blocking)

use hyprland::data::*;
use hyprland::prelude::*;
use hyprland::shared::HResult;

fn main() -> HResult<()> {
    let monitors = Monitors::get()?.to_vec();
    println!("{monitors:#?}");

    let workspaces = Workspaces::get()?.to_vec();
    println!("{workspaces:#?}");

    let clients = Clients::get()?.to_vec();
    println!("{clients:#?}");

    let active_window = Client::get_active()?;
    println!("{active_window:#?}");

    let layers = Layers::get()?;
    println!("{layers:#?}");

    let devices = Devices::get()?;
    println!("{devices:#?}");

    let version = Version::get()?;
    println!("{version:#?}");

    let cursor_pos = CursorPosition::get()?;
    println!("{cursor_pos:#?}");
    Ok(())
}

Structs§

Animation
A struct representing a animation
Animations
Struct that holds animations and beziers
Bezier
A bezier curve
Bind
A keybinding returned from the binds command
Binds
This struct holds a vector of binds
Client
This struct holds information for a client/window
Clients
This struct holds a vector of clients
CursorPosition
This struct holds information on the cursor position
Devices
This struct holds all current devices
FullscreenState
A helper struct that provides the current fullscreen state
Keyboard
This struct holds information about a keyboard device
LayerClient
This struct holds information about a layer surface/client
LayerDisplay
This struct holds all the layer surfaces for a display
Layers
This struct holds a hashmap of all current displays, and their layer surfaces
Monitor
This struct holds information for a monitor
Monitors
This struct holds a vector of monitors
Mouse
This struct holds information about a mouse device
Tablet
This struct holds information about a tablet device
Version
This struct holds version information
Workspace
This struct holds information for a workspace
WorkspaceBasic
This struct holds a basic identifier for a workspace often used in other structs
WorkspaceRules
This struct holds a vector of workspace rules per workspace
WorkspaceRuleset
The rules of an individual workspace, as returned by hyprctl json.
Workspaces
This type provides a vector of workspaces

Enums§

AnimationStyle
Animation styles
BezierIdent
Bezier identifier
FullscreenMode
This struct holds information for a client/window fullscreen mode
TabletBelongsTo
A enum to match what the tablet belongs to
TabletType
A enum that holds the types of tablets
Transforms
This enum provides the different monitor transforms