Enum DispatchType

pub enum DispatchType<'a> {
Show 60 variants Custom(&'a str, &'a str), SetCursor(&'a str, u16), Exec(&'a str), Pass(WindowIdentifier<'a>), Global(&'a str), KillActiveWindow, CloseWindow(WindowIdentifier<'a>), Workspace(WorkspaceIdentifierWithSpecial<'a>), MoveToWorkspace(WorkspaceIdentifierWithSpecial<'a>, Option<WindowIdentifier<'a>>), MoveToWorkspaceSilent(WorkspaceIdentifierWithSpecial<'a>, Option<WindowIdentifier<'a>>), ToggleFloating(Option<WindowIdentifier<'a>>), ToggleFullscreen(FullscreenType), ToggleFakeFullscreen, ToggleDPMS(bool, Option<&'a str>), TogglePseudo, TogglePin, MoveFocus(Direction), MoveWindow(WindowMove<'a>), CenterWindow, ResizeActive(Position), MoveActive(Position), ResizeWindowPixel(Position, WindowIdentifier<'a>), MoveWindowPixel(Position, WindowIdentifier<'a>), CycleWindow(CycleDirection), SwapNext(CycleDirection), SwapWindow(Direction), FocusWindow(WindowIdentifier<'a>), FocusMonitor(MonitorIdentifier<'a>), ChangeSplitRatio(f32), ToggleOpaque, MoveCursorToCorner(Corner), MoveCursor(i64, i64), WorkspaceOption(WorkspaceOptions), RenameWorkspace(i32, Option<&'a str>), Exit, ForceRendererReload, MoveCurrentWorkspaceToMonitor(MonitorIdentifier<'a>), MoveWorkspaceToMonitor(WorkspaceIdentifier<'a>, MonitorIdentifier<'a>), SwapActiveWorkspaces(MonitorIdentifier<'a>, MonitorIdentifier<'a>), BringActiveToTop, ToggleSpecialWorkspace(Option<String>), FocusUrgentOrLast, FocusCurrentOrLast, ToggleSplit, SwapWithMaster(SwapWithMasterParam), FocusMaster(FocusMasterParam), AddMaster, RemoveMaster, OrientationLeft, OrientationRight, OrientationTop, OrientationBottom, OrientationCenter, OrientationNext, OrientationPrev, ToggleGroup, ChangeGroupActive(WindowSwitchDirection), LockGroups(LockType), MoveIntoGroup(Direction), MoveOutOfGroup,
}
Expand description

This enum holds every dispatcher

Variants§

§

Custom(&'a str, &'a str)

This lets you use dispatchers not supported by hyprland-rs yet, please make issues before using

Tuple Fields

§0: &'a str

Name of event

§1: &'a str

Args

§

SetCursor(&'a str, u16)

This dispatcher changes the current cursor

Tuple Fields

§0: &'a str

The cursor theme

§1: u16

The size

§

Exec(&'a str)

This dispatcher executes a program

§

Pass(WindowIdentifier<'a>)

This dispatcher passes a keybind to a window when called in a keybind, its used for global keybinds. And should ONLY be used with keybinds

§

Global(&'a str)

Executes a Global Shortcut using the GlobalShortcuts portal.

§

KillActiveWindow

This dispatcher kills the active window/client

§

CloseWindow(WindowIdentifier<'a>)

This dispatcher closes the specified window

§

Workspace(WorkspaceIdentifierWithSpecial<'a>)

This dispatcher changes the current workspace

§

MoveToWorkspace(WorkspaceIdentifierWithSpecial<'a>, Option<WindowIdentifier<'a>>)

This dispatcher moves a window (focused if not specified) to a workspace

§

MoveToWorkspaceSilent(WorkspaceIdentifierWithSpecial<'a>, Option<WindowIdentifier<'a>>)

This dispatcher moves a window (focused if not specified) to a workspace, without switching to that workspace

§

ToggleFloating(Option<WindowIdentifier<'a>>)

This dispatcher floats a window (current if not specified)

§

ToggleFullscreen(FullscreenType)

This dispatcher toggles the current window fullscreen state

§

ToggleFakeFullscreen

This dispatcher toggles the focused window’s internal fullscreen state without altering the geometry

§

ToggleDPMS(bool, Option<&'a str>)

This dispatcher sets the DPMS status for all monitors

§

TogglePseudo

This dispatcher toggles pseudo tiling for the current window

§

TogglePin

This dispatcher pins the active window to all workspaces

§

MoveFocus(Direction)

This dispatcher moves the window focus in a specified direction

§

MoveWindow(WindowMove<'a>)

This dispatcher moves the current window to a monitor or in a specified direction

§

CenterWindow

This dispatcher centers the active window

§

ResizeActive(Position)

This dispatcher resizes the active window using a Position enum

§

MoveActive(Position)

This dispatcher moves the active window using a Position enum

§

ResizeWindowPixel(Position, WindowIdentifier<'a>)

This dispatcher resizes the specified window using a Position enum

§

MoveWindowPixel(Position, WindowIdentifier<'a>)

This dispatcher moves the specified window using a Position enum

§

CycleWindow(CycleDirection)

This dispatcher cycles windows using a specified direction

§

SwapNext(CycleDirection)

This dispatcher swaps the focused window with the window on a workspace using a specified direction

§

SwapWindow(Direction)

This dispatcher swaps windows using a specified direction

§

FocusWindow(WindowIdentifier<'a>)

This dispatcher focuses a specified window

§

FocusMonitor(MonitorIdentifier<'a>)

This dispatcher focuses a specified monitor

§

ChangeSplitRatio(f32)

This dispatcher changed the split ratio

§

ToggleOpaque

This dispatcher toggle opacity for the current window/client

§

MoveCursorToCorner(Corner)

This dispatcher moves the cursor to a specified corner of a window

§

MoveCursor(i64, i64)

This dispatcher moves the cursor to a specified position (x, y) where x starts from left to right, and y starts from top to bottom

§

WorkspaceOption(WorkspaceOptions)

This dispatcher applied a option to all windows in a workspace

§

RenameWorkspace(i32, Option<&'a str>)

This dispatcher renames a workspace

§

Exit

This exits Hyprland (DANGEROUS)

§

ForceRendererReload

This dispatcher forces the renderer to reload

§

MoveCurrentWorkspaceToMonitor(MonitorIdentifier<'a>)

This dispatcher moves the current workspace to a specified monitor

§

MoveWorkspaceToMonitor(WorkspaceIdentifier<'a>, MonitorIdentifier<'a>)

This dispatcher moves a specified workspace to a specified monitor

§

SwapActiveWorkspaces(MonitorIdentifier<'a>, MonitorIdentifier<'a>)

This dispatcher swaps the active workspaces of two monitors

§

BringActiveToTop

This dispatcher brings the active window to the top of the stack

§

ToggleSpecialWorkspace(Option<String>)

This toggles the special workspace (AKA scratchpad)

§

FocusUrgentOrLast

This dispatcher jump to urgent or the last window

§

FocusCurrentOrLast

Switch focus from current to previously focused window

§

ToggleSplit

Toggles the split (top/side) of the current window. preserve_split must be enabled for toggling to work.

§

SwapWithMaster(SwapWithMasterParam)

Swaps the current window with master. If the current window is the master, swaps it with the first child.

§

FocusMaster(FocusMasterParam)

Focuses the master window.

§

AddMaster

Adds a master to the master side. That will be the active window, if it’s not a master, or the first non-master window.

§

RemoveMaster

Removes a master from the master side. That will be the active window, if it’s a master, or the last master window.

§

OrientationLeft

Sets the orientation for the current workspace to left (master area left, slave windows to the right, vertically stacked)

§

OrientationRight

Sets the orientation for the current workspace to right (master area right, slave windows to the left, vertically stacked)

§

OrientationTop

Sets the orientation for the current workspace to top (master area top, slave windows to the bottom, horizontally stacked)

§

OrientationBottom

Sets the orientation for the current workspace to bottom (master area bottom, slave windows to the top, horizontally stacked)

§

OrientationCenter

Sets the orientation for the current workspace to center (master area center, slave windows alternate to the left and right, vertically stacked)

§

OrientationNext

Cycle to the next orientation for the current workspace (clockwise)

§

OrientationPrev

Cycle to the previous orientation for the current workspace (counter-clockwise)

§

ToggleGroup

Toggles the current active window into a group

§

ChangeGroupActive(WindowSwitchDirection)

Switches to the next window in a group.

§

LockGroups(LockType)

Locks the groups

§

MoveIntoGroup(Direction)

Moves the active window into a group in a specified direction

§

MoveOutOfGroup

Moves the active window out of a group.

Trait Implementations§

§

impl<'a> Clone for DispatchType<'a>

§

fn clone(&self) -> DispatchType<'a>

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

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

Performs copy-assignment from source. Read more
§

impl<'a> Debug for DispatchType<'a>

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for DispatchType<'a>

§

impl<'a> RefUnwindSafe for DispatchType<'a>

§

impl<'a> Send for DispatchType<'a>

§

impl<'a> Sync for DispatchType<'a>

§

impl<'a> Unpin for DispatchType<'a>

§

impl<'a> UnwindSafe for DispatchType<'a>

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.