moocow(1)

πŸ“¦ version 0.3, in fedora 44

✨ 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 to moocow must precede command. once command is seen, all remaining options are passed to cow unchanged. an optional -- may still be used before command, 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 boolean enable or disable formatted JSON responses. the default is true.
  • .moocow-show print current local moocow settings.

πŸ’… OPTIONS πŸ’…

  • -h β€” print usage and exit. short, sweet, iconic.
  • -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.

πŸ”₯ 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 -p mode, moocow keeps reading commands but exits with status 1 if any command failed. so it's forgiving, but it remembers. πŸ’€

🌈 ENVIRONMENT 🌈

  • 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. boundaries, bestie. 🚧

🧚 FILES 🧚

  • $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.

⭐ 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 🫢

cow(1), cowbar(1)


πŸ‘‘ 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