herbstclient(1)
===============
:doctype: manpage
:man version: {herbstluftwmversion}


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.

// FIXME: this ##s## is an ugly hack... is there an other solution?
See *herbstluftwm*(1) for a list of available 'COMMAND'##s## and their 'ARGS'.

If '--wait' or '--idle' is passed, than it waits for hooks from *herbstluftwm*.
The hook is printed, if it matches the optional 'FILTER'. 'FILTER's are regular
expressions. For a list of available hooks see *herbstluftwm*(1).

OPTIONS
-------
*-n*, *--no-newline*::
    Do not print a newline if output does not end with a newline.

*-i*, *--idle*::
    Wait for hooks instead of executing commands.

*-w*, *--wait*::
    Same as *--idle* but exit after first *--count* hooks.

*-c*, *--count* 'COUNT'::
    Let *--wait* exit after 'COUNT' hooks were received and printed. The default of
    'COUNT' is 1.

*-q*, *--quiet*::
    do not print error messages if herbstclient cannot connect to the running
    herbstluftwm instance.

ENVIRONMENT VARIABLES
---------------------
DISPLAY::
    specifies the 'DISPLAY' to use, e.g. where *herbstluftwm*(1) is running.

EXIT STATUS
-----------
Returns the exit status of the 'COMMAND' execution in *herbstluftwm(1)* server.

*0*::
    Success

other::
    Failure. See *herbstluftwm*(1) for a list of error codes.


BUGS
----
It waits endlessly for a response from *herbstluftwm* (there is no timeout yet).

See the *herbstluftwm* distribution BUGS file.

COMMUNITY
---------
Feel free to join the IRC channel '#herbstluftwm' on 'irc.freenode.net'.

AUTHOR
------
*herbstclient* was written by Thorsten Wißmann.

RESOURCES
---------
Gitweb: <http://git.cs.fau.de/?p=re06huxa/herbstluftwm>

COPYING
-------
Copyright 2011 Thorsten Wißmann. All rights reserved.

This software is licensed under the "Simplified BSD License". See LICENSE for
details

// vim: tw=80
