moocow(1)
moocow(1) moocow - cow IPC client moocow(1)

moocow - send commands to a running cow instance

moocow command [args ...]

moocow -p [-P prompt] [-S prompt] [-C colour]

moocow is the command-line IPC client for the cow(1) window manager. It connects to the cow IPC socket, sends the given command, waits for the JSON response, and prints it as formatted JSON to standard output.

All arguments are joined with spaces and sent as a single newline-terminated line. The full command language is described in cow(1).

With -p, moocow stays running and reads commands from standard input. When run interactively it prints a connection banner containing the moocow version and client ID, then the prompt >>> before each command. Incomplete commands use the prompt ... until the command is complete. A backslash (\) at the end of a line continues the command on the next line.

Persistent mode also recognises local commands which begin with . and are not sent to cow:

.moocow-set pretty-print-json boolean

Enable or disable formatted JSON responses. The default is true.

.moocow-show

Print current local moocow settings.

-h

Print usage and exit.

-p

Read and evaluate commands persistently. The client ID shown in the connection banner is the moocow process ID.

-P prompt

Set the primary prompt used by -p. The default is >>> .

-S prompt

Set the continuation prompt used by -p. The default is ... .

-C colour

Set the prompt colour used by -p. The default is red. Supported colours are black, red, green, yellow, blue, magenta, cyan, white, and none.

0

The command was accepted and cow responded with "ok": true.

1

A connection error occurred, or cow responded with "ok": false. The error message is included in the JSON response and printed to standard output. In -p mode, moocow keeps reading commands but exits with status 1 if any command failed.

COW_IPC_SOCKET

Override the socket path. When set, moocow connects to this path instead of the default.

XDG_RUNTIME_DIR

Used to locate the default socket path. Must be set if COW_IPC_SOCKET is not.

WAYLAND_DISPLAY

Used to qualify the default socket name so separate CoW instances in the same runtime directory do not share a command socket.

$XDG_RUNTIME_DIR/cow-$WAYLAND_DISPLAY-cmd.sock

Default IPC command socket created by cow(1). If WAYLAND_DISPLAY is unset, the fallback path is $XDG_RUNTIME_DIR/cow-cmd.sock.

Query all managed windows:

moocow show windows

Apply a decoration profile:

moocow decor -a default

Switch to desk 3:

moocow desk -d 3

Reload the configuration:

moocow quit -r

Close the focused window:

moocow winops -c

List all available commands:

moocow list-commands

Run commands persistently:

moocow -p

Run persistently with custom prompts:

moocow -p -P 'cow> ' -S '...> ' -C green

cow(1), cowbar(1)

Thomas Adam

2026-08-01 0.2