| HERBSTCLIENT(1) | HERBSTCLIENT(1) |
NAME
herbstclient - sends commands to a running herbstluftwm instance via X
SYNOPSIS
herbstclient [OPTIONS] COMMAND [ARGS ...]
herbstclient [OPTIONS] [--wait|--idle] [FILTER ...]
DESCRIPTION
Sends a COMMAND with its (optional) arguments ARGS to a running herbstluftwm(1) instance via Xlib. If COMMAND has an output, it is printed by herbstclient. If output does not end with a newline, then a newline is added to improve readability.
See herbstluftwm(1) for a list of available COMMANDs and their ARGS.
If --wait or --idle is passed, then it waits for hooks from herbstluftwm. The hook is printed, if it matches the optional FILTER. FILTERs are regular expressions. For a list of available hooks see herbstluftwm(1).
OPTIONS
-n, --no-newline
-0, --print0
-l, --last-arg
-i, --idle
-w, --wait
-c, --count COUNT
-q, --quiet
-v, --version
-h, --help
--binary-pipe
BINARY PIPE
When --binary-pipe is passed, a binary communication channel to herbstluftwm is established such that multiple commands can be run through a single herbstclient instance. Both stdin and stdout are in binary mode, whereas the stderr channel remains text mode. The interface consists of null-byte terminated UTF-8 text tokens. The following token sequences are supported on stdin, where 0 denotes a null-byte:
On stdout, null-byte separated key-value pairs are printed, that is, the output will always be a sequence of the format KEY 0 VALUE 0. The protocol may be extended in the future, but will always stick to the key-value-format.
Whenever herbstluftwm quits or when the EOF of stdin is reached, then the binary pipe also closes and herbstclient exits.
Example:
printf 'ARG\0echo\0ARG\0hello world\0RUN\0ARG\0get_attr\0ARG\0tags.count\0RUN\0' \
| herbstclient --binary-pipe \
| hexdump -C
ENVIRONMENT VARIABLES
DISPLAY
EXIT STATUS
Returns the exit status of the COMMAND execution in herbstluftwm(1) server.
0
other
BUGS
See the herbstluftwm Github issues: https://github.com/herbstluftwm/herbstluftwm/issues
COMMUNITY
Feel free to join the IRC channel #herbstluftwm on irc.libera.chat.
AUTHOR
herbstclient was written by Thorsten Wißmann. All contributors are listed in the herbstluftwm distribution AUTHORS file.
RESOURCES
Homepage: http://herbstluftwm.org
Github page: http://github.com/herbstluftwm/herbstluftwm
Patch submission and bug reporting:
hlwm@lists.herbstluftwm.org
COPYING
Copyright 2011-2020 Thorsten Wißmann. All rights reserved.
This software is licensed under the "Simplified BSD License". See LICENSE for details.
| 2026-04-03 | herbstluftwm 0.9.6 |