Skip to main content

DispatchType

Enum DispatchType 

Source
pub enum DispatchType<'a> {
Show 89 variants Custom(&'a str, &'a str), SetCursor(&'a str, u16), Exec(&'a str), ExecRaw(&'a str), Pass(WindowIdentifier<'a>), Global(&'a str), KillActiveWindow, ForceKillActiveWindow, CloseWindow(WindowIdentifier<'a>), Workspace(WorkspaceIdentifierWithSpecial<'a>), MoveToWorkspace(WorkspaceIdentifierWithSpecial<'a>, Option<WindowIdentifier<'a>>), MoveToWorkspaceSilent(WorkspaceIdentifierWithSpecial<'a>, Option<WindowIdentifier<'a>>), ToggleFloating(Option<WindowIdentifier<'a>>), SetFloating(Option<WindowIdentifier<'a>>), SetTiled(Option<WindowIdentifier<'a>>), ToggleFullscreen(FullscreenType), ToggleFullscreenState(FullscreenState, FullscreenState), ToggleFakeFullscreen, ToggleDPMS(bool, Option<&'a str>), TogglePseudo, TogglePin, TogglePinWindow(WindowIdentifier<'a>), SendShortcut(&'a [Mod], &'a str, Option<WindowIdentifier<'a>>), Signal(SignalType), SignalWindow(WindowIdentifier<'a>, SignalType), MoveFocus(Direction), MoveWindow(WindowMove<'a>), CenterWindow, ResizeActive(Position), MoveActive(Position), ResizeWindowPixel(Position, WindowIdentifier<'a>), MoveWindowPixel(Position, WindowIdentifier<'a>), CycleWindow(CycleDirection), SwapNext(CycleDirection), SwapWindow(Direction), TagWindow(TagAction, &'a str, Option<WindowIdentifier<'a>>), FocusWindow(WindowIdentifier<'a>), FocusMonitor(MonitorIdentifier<'a>), ChangeSplitRatio(FloatValue), ToggleOpaque, MoveCursorToCorner(Corner), MoveCursor(i64, i64), WorkspaceOption(WorkspaceOptions), RenameWorkspace(WorkspaceId, Option<&'a str>), Exit, ForceRendererReload, MoveCurrentWorkspaceToMonitor(MonitorIdentifier<'a>), MoveWorkspaceToMonitor(WorkspaceIdentifier<'a>, MonitorIdentifier<'a>), SwapActiveWorkspaces(MonitorIdentifier<'a>, MonitorIdentifier<'a>), BringActiveToTop, AlterZOrder(ZOrder, Option<WindowIdentifier<'a>>), ToggleSpecialWorkspace(Option<String>), FocusUrgentOrLast, FocusCurrentOrLast, ToggleSwallow, Submap(SubmapParam<'a>), ToggleSplit, SwapSplit, PreSelect(Direction), MoveToRoot(Option<WindowIdentifier<'a>>, MoveToRootParam), SwapWithMaster(SwapWithMasterParam), FocusMaster(FocusMasterParam), CycleNextMaster(MasterLoopParam), CyclePrevMaster(MasterLoopParam), SwapNextMaster(MasterLoopParam), SwapPrevMaster(MasterLoopParam), AddMaster, RemoveMaster, OrientationLeft, OrientationRight, OrientationTop, OrientationBottom, OrientationCenter, OrientationNext, OrientationPrev, OrientationCycle(OrientationParam), Mfact(FloatValue), RollNext, RollPrev, ToggleGroup, ChangeGroupActive(WindowSwitchDirection), LockGroups(LockType), LockActiveGroup(LockType), MoveIntoGroup(Direction), MoveWindowOrGroup(Direction), MoveOutOfGroup, MoveGroupWindow(WindowSwitchDirection), DenyWindowFromGroup(BinaryState), SetIgnoreGroupLock(BinaryState),
}
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

§

ExecRaw(&'a str)

This dispatcher executes a raw shell command ignoring window rules

§

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 closes the active window/client

§

ForceKillActiveWindow

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 toggles the floating state of a window (current if not specified)

§

SetFloating(Option<WindowIdentifier<'a>>)

This dispatcher floats a window (current if not specified)

§

SetTiled(Option<WindowIdentifier<'a>>)

This dispatcher tiles a window (current if not specified)

§

ToggleFullscreen(FullscreenType)

This dispatcher toggles the current window fullscreen state

§

ToggleFullscreenState(FullscreenState, FullscreenState)

This dispatcher sets the focused window’s fullscreen mode and the one sent to the client

§

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

§

TogglePinWindow(WindowIdentifier<'a>)

This dispatcher pins the specified window to all workspaces

§

SendShortcut(&'a [Mod], &'a str, Option<WindowIdentifier<'a>>)

This dispatcher sends a shortcut to the specified window

Tuple Fields

§0: &'a [Mod]

The modifiers

§1: &'a str

The key, e.g., “A”

§2: Option<WindowIdentifier<'a>>

The window identifier

§

Signal(SignalType)

This dispatcher sends a signal to the active window

§

SignalWindow(WindowIdentifier<'a>, SignalType)

This dispatcher sends a signal to the specified window

§

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

§

TagWindow(TagAction, &'a str, Option<WindowIdentifier<'a>>)

Apply tag to current or the first window matching

§

FocusWindow(WindowIdentifier<'a>)

This dispatcher focuses a specified window

§

FocusMonitor(MonitorIdentifier<'a>)

This dispatcher focuses a specified monitor

§

ChangeSplitRatio(FloatValue)

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(WorkspaceId, 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

§

AlterZOrder(ZOrder, Option<WindowIdentifier<'a>>)

This dispatcher brings the active window to the top or bottom 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

§

ToggleSwallow

Swallow or Unswallow a window

§

Submap(SubmapParam<'a>)

Change the current mapping group

§

ToggleSplit

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

§

SwapSplit

Swaps the two halves of the split of the current window

§

PreSelect(Direction)

One-time override for the split direction (only works on tiled windows)

§

MoveToRoot(Option<WindowIdentifier<'a>>, MoveToRootParam)

Moves the selected window (active window if unspecified) to the root of its workspace tree

§

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.

§

CycleNextMaster(MasterLoopParam)

Focuses the next window respecting the layout

§

CyclePrevMaster(MasterLoopParam)

Focuses the previous window respecting the layout

§

SwapNextMaster(MasterLoopParam)

Swaps the focused window with the next window respecting the layout

§

SwapPrevMaster(MasterLoopParam)

Swaps the focused window with the previous window respecting the layout

§

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)

§

OrientationCycle(OrientationParam)

Cycle to the next orientation from the provided list, for the current workspace

§

Mfact(FloatValue)

Change mfact, the master split ratio

§

RollNext

Rotate the next window in stack to be the master, while keeping the focus on master

§

RollPrev

Rotate the previous window in stack to be the master, while keeping the focus on master

§

ToggleGroup

Toggles the current active window into a group

§

ChangeGroupActive(WindowSwitchDirection)

Switches to the next window in a group.

§

LockGroups(LockType)

Locks the groups

§

LockActiveGroup(LockType)

Locks the currently focused group

§

MoveIntoGroup(Direction)

Moves the active window into a group in a specified direction

§

MoveWindowOrGroup(Direction)

Moves the active window into or out of a group in a specified direction

§

MoveOutOfGroup

Moves the active window out of a group.

§

MoveGroupWindow(WindowSwitchDirection)

Swaps the active window with the next or previous in a group

§

DenyWindowFromGroup(BinaryState)

Prohibit the active window from becoming or being inserted into group

§

SetIgnoreGroupLock(BinaryState)

Temporarily enable or disable ignore_group_lock

Trait Implementations§

Source§

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

Source§

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

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

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

Source§

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

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> UnsafeUnpin 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, 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> 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.