Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.
nuxsh edited this page Aug 26, 2021 · 5 revisions

This build of dwm implements inter-process communication through a UNIX socket. This allows us to query the window manager for information, listen for events such as tag changes or layout changes, as well as send commands to control the window manager from other programs/scripts.

Supported IPC Messages

  • Run user-defined command: run_command
  • Get list of layouts: get_layouts
  • Get list of tags: get_tags
  • Get the properties of all of the monitors: get_monitors
  • Get the properties of a specific dwm client: get_dwm_client <client_id>
  • Subscribe to an event: subscribe [events]

dwmc

dwmc is the cli interface that supports all of the IPC Messages listed above.

IPCCOMMAND Macro Format

  IPCCOMMAND(  view,           1,                 {ARG_TYPE_UINT}   ),
               ^^^^            ^                  ^^^^^^^^^^^^^^^
            Function     # of Arguments       Array of Argument Types

Argument Types

typedef enum ArgType {
  ARG_TYPE_NONE = 0,
  ARG_TYPE_UINT = 1,
  ARG_TYPE_SINT = 2,
  ARG_TYPE_FLOAT = 3,
  ARG_TYPE_PTR = 4,
  ARG_TYPE_STR = 5
} ArgType;

Patches:

dwm-ipc patch by Mihir Lad