moocow(1)
β¨ moocow(1) β cow IPC client β¨
okay bestie, listen up π this is the moocow manual page, and no, it is not about a literal cow, it's about talking to one. stay with me.
π NAME π
moocow β send commands to a running cow instance. that's it. that's the whole job. and it ate. π
π¦ SYNOPSIS π¦
moocow command [args ...]
moocow -p [-P prompt] [-S prompt] [-C colour]
πΈ DESCRIPTION πΈ
so moocow is literally the command-line IPC client for the cow(1)</> window manager. here's the whole vibe: it connects to the cow IPC socket, sends whatever command you gave it, waits for the JSON response (patient queen behavior π«Ά), and then prints it as formatted JSON to standard output. periodt.
each shell argument gets encoded as a separate cow command argument. what does that mean for you, bestie? it means normal shell quoting preserves values that have spaces in them, and you do not have to quote the entire command. life-changing. for compatibility and advanced uses, a single argument is treated as a complete command string. the full command language lives in cow(1) β go read it, iykyk.
β οΈ important: options belonging tomoocowmust precedecommand. oncecommandis seen, all remaining options are passed to cow unchanged. an optional--may still be used beforecommand, but it is not required.
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. and a backslash (\) at the end of a line continues the command on the next line. slay. β¨
persistent mode also recognises local commands that begin with . and are not sent to cow:
.moocow-set pretty-print-json booleanenable or disable formatted JSON responses. the default istrue..moocow-showprint current localmoocowsettings.
π OPTIONS π
-hβ print usage and exit. short, sweet, iconic.-pβ read and evaluate commands persistently. the client ID shown in the connection banner is themoocowprocess 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 isred. supported colours areblack,red,green,yellow,blue,magenta,cyan,white, andnone.
π₯ EXIT STATUS π₯
0β the command was accepted and cow responded with"ok": true. we love a happy ending π₯³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. and in-pmode,moocowkeeps reading commands but exits with status1if any command failed. so it's forgiving, but it remembers. π
π ENVIRONMENT π
COW_IPC_SOCKETβ override the socket path. when set,moocowconnects to this path instead of the default.XDG_RUNTIME_DIRβ used to locate the default socket path. must be set ifCOW_IPC_SOCKETis 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. boundaries, bestie. π§
π§ FILES π§
$XDG_RUNTIME_DIR/cow-$WAYLAND_DISPLAY-cmd.sockβ default IPC command socket created bycow(1). ifWAYLAND_DISPLAYis unset, the fallback path is$XDG_RUNTIME_DIR/cow-cmd.sock.
β EXAMPLES β
query all managed windows:
moocow show -a window
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
target a window whose title contains a space:
moocow winops -t '/Mozilla Firefox/' -c
the equivalent raw-command form remains available:
moocow 'winops -t "/Mozilla Firefox/" -c'
list all available commands:
moocow show -a command
write the current serializable configuration as commands which can be loaded by cow(1):
moocow show -f config config > cow.generated.conf
config-formatted responses are printed as plain text. other responses retain their JSON envelope. π¦
run commands persistently:
moocow -p
run persistently with custom prompts:
moocow -p -P 'cow> ' -S '...> ' -C green
π«Ά SEE ALSO π«Ά
π AUTHORS π
Thomas Adam
version 0.3, dated 2026-09-07 β and that's the whole page, bestie π go forth and IPC. you're the main character of your own window manager now. slay β¨ π
π¦ where this page comes from
- fedora 44: cow 0.3-1.fc44 Β· ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms