docs/hyprctl: update example code for hyprctl dispatch (#14656)

* docs/hyprctl: Update example commands for hyprctl dispatch

Vaxry decided that this is an expected behavior in https://github.com/hyprwm/Hyprland/discussions/14255

I decided to update documents to follow the new dispatch syntax

* docs/hyprctl: hyprctl man page with new examples and notes

Added examples for dispatch command and noted lua config limitation.

* docs/hyprctl: update hyprctl documentation with 'eval' command

* docs/hyprctl: document 'eval' command for Lua-based config
This commit is contained in:
CatNowBlue
2026-05-21 20:30:16 +01:00
committed by GitHub
parent 95d9ae23e0
commit ba578321e8
2 changed files with 32 additions and 4 deletions
+17 -2
View File
@@ -41,10 +41,10 @@ For dispatchers without parameters it can be anything.
Returns: \f[I]ok\f[R] on success, and an error message on failure. Returns: \f[I]ok\f[R] on success, and an error message on failure.
.TP .TP
Examples: Examples:
\f[B]hyprctl\f[R] \f[I]dispatch exec kitty\f[R] \f[B]hyprctl\f[R] \f[I]dispatch "hl.dsp.exec_cmd('kitty')"\f[R]
.RS .RS
.PP .PP
\f[B]hyprctl\f[R] \f[I]dispatch pseudo x\f[R] \f[B]hyprctl\f[R] \f[I]dispatch "hl.dsp.window.close()"\f[R]
.RE .RE
.RE .RE
.PP .PP
@@ -52,6 +52,7 @@ Examples:
.RS .RS
.PP .PP
Set a config keyword dynamically. Set a config keyword dynamically.
This will not work if your config provider is lua (refer to \f[B]eval\f[R]).
.PP .PP
Returns: \f[I]ok\f[R] on success, and an error message on failure. Returns: \f[I]ok\f[R] on success, and an error message on failure.
.TP .TP
@@ -63,6 +64,20 @@ Examples:
.RE .RE
.RE .RE
.PP .PP
\f[B]eval\f[R]
.RS
.PP
Evaluate arbitrary Lua expressions dynamically when using a Lua-based config provider.
.PP
Returns: \f[I]ok\f[R] on success, and an error message on failure.
.TP
Examples:
\f[B]hyprctl\f[R] \f[I]eval 'hl.config({ general = { border_size = 10 } })'\f[R]
.RS
.PP
\f[B]hyprctl\f[R] \f[I]eval 'hl.bind("SUPER + SHIFT + Q", hl.dsp.exec_cmd("firefox"))'\f[R]
.RE
.PP
\f[B]reload\f[R] \f[B]reload\f[R]
.RS .RS
.PP .PP
+15 -2
View File
@@ -29,14 +29,16 @@ CONTROL COMMANDS
Returns: *ok* on success, and an error message on failure. Returns: *ok* on success, and an error message on failure.
Examples: Examples:
**hyprctl** *dispatch exec kitty* **hyprctl** *dispatch "hl.dsp.exec_cmd('kitty')"*
**hyprctl** *dispatch pseudo x* **hyprctl** *dispatch "hl.dsp.window.close()"*
**keyword** **keyword**
Set a config keyword dynamically. Set a config keyword dynamically.
This will not work if your config provider is lua (refer to **eval**)
Returns: *ok* on success, and an error message on failure. Returns: *ok* on success, and an error message on failure.
Examples: Examples:
@@ -44,6 +46,17 @@ CONTROL COMMANDS
**hyprctl** *keyword general:border_size 10* **hyprctl** *keyword general:border_size 10*
**eval**
Evaluate arbitrary Lua expressions dynamically when using a Lua-based config provider.
Returns: *ok* on success, and an error message on failure.
Examples:
**hyprctl** *eval 'hl.bind("SUPER + SHIFT + Q", hl.dsp.exec_cmd("firefox"))'*
**hyprctl** *eval 'hl.config({ general = { border_size = 10 } })'*
**reload** **reload**
Force a reload of the config file. Force a reload of the config file.