DARKMAN-IPC(5) File Formats Manual DARKMAN-IPC(5)

darkman-ipcdarkman socket API

darkman(1) listens on a Unix socket for query and control commands. The socket exposes a simple text-based protocol. Commands are newline-terminated, and each response is also followed by a newline.

The path to the socket can be configured using the socketpath setting in darkman.conf(5). The default value is ${XDG_RUNTIME_DIR}/darkman/control.sock.

The following commands are recognised:

Print the current mode.
dark |
Set the current mode.
Switch to the opposite mode. The new mode is printed as a response.
Print mode changes as they occur. The current mode is printed immediately, followed by each subsequent change.

To interact with the socket manually:

socat UNIX-CONNECT:${XDG_RUNTIME_DIR}/darkman/control.sock STDIO

A libdarkman Go package is available to query this interface from other client applications. See its documentation for details: https://godocs.io/gitlab.com/WhyNotHugo/darkman/libdarkman

darkman(1), darkman.conf(5)

Developed by Hugo O. Barrera <hugo@whynothugo.nl>, with invaluable contributions from the community.

2026-07-07 Linux 6.18.37-0-lts