NAME
merdectl —
control a running MERDE
session
SYNOPSIS
merdectl |
[--socket path]
command [argument ...] |
DESCRIPTION
merdectl sends one datagram command to a
running merde(1) session. The default socket is
$XDG_RUNTIME_DIR/merde/session.sock. Except for
list, successful delivery produces no output and
does not wait for the command to finish.
CONTROL PROTOCOL
The control endpoint is an AF_UNIX
SOCK_DGRAM socket. One datagram contains one command
of at most 1023 bytes. Arguments are joined with single ASCII spaces; the
protocol has no quoting or escaping layer. For
notify and launch, the
session passes the complete text after the verb to the requested operation.
Other commands split arguments on ASCII whitespace.
The protocol has no reply or acknowledgement. A zero exit status
means the datagram was delivered to the socket, not that the session
accepted or completed the operation. Malformed and unknown commands are
logged by the session and ignored. list with the
default socket is different: it reads
$XDG_RUNTIME_DIR/merde/state.txt directly and fails
if that file cannot be opened.
COMMANDS
list- Print the current state file.
spawn- Start the configured terminal.
focusnext|prev- Focus another window on the active workspace.
workspacenext|prev|1..10- Switch the active output to a workspace.
move-workspaceidnext|prev|1..10- Move a window to a workspace.
closeid- Ask a window to close.
moveid x [y]- Place a window at absolute coordinates.
move-relid dx [dy]- Move a window relative to its current position.
resizeid width [height]- Set a window size.
resize-relid dw [dh]- Resize a window relative to its current size.
fullscreenid- Toggle fullscreen for a window.
notifytext ...- Send a notification through the configured notifier.
screenshot[path [output=primary[region=WIDTHxHEIGHT+X+Y]]]- Start the configured screenshot tool.
restartbar|wallpaper|notify|all- Restart one or all long-lived companions.
launchcommand ...- Run a shell command inside the session.
quit- End the MERDE session.
WINDOW IDENTIFIERS
Window identifiers are positive integers assigned in mapping
order. They are unique and are not reused during one MERDE session, but
numbering starts again at 1 in the next session. Read the current
identifiers from merdectl list. An identifier from
an earlier session is invalid.
ENVIRONMENT
XDG_RUNTIME_DIR- Selects the default runtime directory. On MOUSE the fallback is /var/run/user/uid.
EXIT STATUS
The merdectl utility exits 0 on
success, and >0 if an error occurs.
DIAGNOSTICS
Socket creation and delivery failures are written to standard error. Commands longer than 1023 bytes are rejected before delivery. Because the protocol has no response, inspect $XDG_RUNTIME_DIR/merde-session.log when a delivered command has no visible effect.