mirror of
https://github.com/hyprwm/Hyprland.git
synced 2026-08-24 02:24:14 -05:00
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:
+17
-2
@@ -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.
|
||||
.TP
|
||||
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
|
||||
.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
|
||||
.PP
|
||||
@@ -52,6 +52,7 @@ Examples:
|
||||
.RS
|
||||
.PP
|
||||
Set a config keyword dynamically.
|
||||
This will not work if your config provider is lua (refer to \f[B]eval\f[R]).
|
||||
.PP
|
||||
Returns: \f[I]ok\f[R] on success, and an error message on failure.
|
||||
.TP
|
||||
@@ -63,6 +64,20 @@ Examples:
|
||||
.RE
|
||||
.RE
|
||||
.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]
|
||||
.RS
|
||||
.PP
|
||||
|
||||
+15
-2
@@ -29,14 +29,16 @@ CONTROL COMMANDS
|
||||
Returns: *ok* on success, and an error message on failure.
|
||||
|
||||
Examples:
|
||||
**hyprctl** *dispatch exec kitty*
|
||||
**hyprctl** *dispatch "hl.dsp.exec_cmd('kitty')"*
|
||||
|
||||
**hyprctl** *dispatch pseudo x*
|
||||
**hyprctl** *dispatch "hl.dsp.window.close()"*
|
||||
|
||||
**keyword**
|
||||
|
||||
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.
|
||||
|
||||
Examples:
|
||||
@@ -44,6 +46,17 @@ CONTROL COMMANDS
|
||||
|
||||
**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**
|
||||
|
||||
Force a reload of the config file.
|
||||
|
||||
Reference in New Issue
Block a user