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
- Cursor
Position - This struct holds information on the cursor position
- Devices
- This struct holds all current devices
- Fullscreen
State - A helper struct that provides the current fullscreen state
- Keyboard
- This struct holds information about a keyboard device
- Layer
Client - This struct holds information about a layer surface/client
- Layer
Display - 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
- Workspace
Basic - This struct holds a basic identifier for a workspace often used in other structs
- Workspace
Rules - This struct holds a vector of workspace rules per workspace
- Workspace
Ruleset - The rules of an individual workspace, as returned by hyprctl json.
- Workspaces
- This type provides a vector of workspaces
Enums§
- Animation
Style - Animation styles
- Bezier
Ident - Bezier identifier
- Fullscreen
Mode - This struct holds information for a client/window fullscreen mode
- Tablet
Belongs To - A enum to match what the tablet belongs to
- Tablet
Type - A enum that holds the types of tablets
- Transforms
- This enum provides the different monitor transforms