3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-08-18 11:02:10 +00:00
Files
Hyprland/docs/hyprctl.1.rst
CatNowBlue ba578321e8 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
2026-05-21 20:30:16 +01:00

139 lines
2.6 KiB
ReStructuredText

:title: hyprctl(1)
:author: Vaxerski <*https://github.com/vaxerski*>
NAME
====
hyprctl - Utility for controlling parts of Hyprland from a CLI or a script
SYNOPSIS
========
**hyprctl** [*(opt)flags*] [**command**] [*(opt)args*]
DESCRIPTION
===========
**hyprctl** is a utility for controlling some parts of the compositor from a CLI or a script.
CONTROL COMMANDS
================
**dispatch**
Call a dispatcher with an argument.
An argument must be present.
For dispatchers without parameters it can be anything.
Returns: *ok* on success, and an error message on failure.
Examples:
**hyprctl** *dispatch "hl.dsp.exec_cmd('kitty')"*
**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:
**hyprctl** *keyword bind SUPER,0,pseudo*
**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.
**kill**
Enter kill mode, where you can kill an app by clicking on it.
You can exit by pressing ESCAPE.
INFO COMMANDS
=============
**version**
Prints the Hyprland version, flags, commit and branch of build.
**monitors**
Lists all the outputs with their properties.
**workspaces**
Lists all workspaces with their properties.
**clients**
Lists all windows with their properties.
**devices**
Lists all connected input devices.
**activewindow**
Returns the active window name.
**layers**
Lists all the layers.
**splash**
Returns the current random splash.
**status**
Returns internal status information like config format or backend.
OPTIONS
=======
**--batch**
Specify a batch of commands to execute.
Example:
**hyprctl** *--batch "keyword general:border_size 2 ; keyword general:gaps_out 20"*
*;* separates the commands.
**-j**
Outputs information in JSON.
BUGS
====
Submit bug reports and request features online at:
<*https://github.com/hyprwm/Hyprland/issues*>
SEE ALSO
========
Sources at: <*https://github.com/hyprwm/Hyprland*>
COPYRIGHT
=========
Copyright (c) 2022, vaxerski