Skip to content

Latest commit

 

History

History
103 lines (66 loc) · 2.15 KB

IPC.md

File metadata and controls

103 lines (66 loc) · 2.15 KB

way-displays IPC

$WAYLAND_DISPLAY must be set and $XDG_VTNR set to match the server's.

way-displays server creates a socket ${XDG_RUNTIME_DIR}/way-displays.${XDG_VTNR}.sock.

If $XDG_RUNTIME_DIR is unset the socket will be /tmp/way-displays.${XDG_VTNR}.sock.

Clients send an !!ipc_request and will receive a sequence of !!ipc_response until the operation is complete and the socket closed.

Response

STATE contains the device states.

CFG contains the active configuration.

MESSAGES contains human readable messages by !!log_threshold as written by the server. These are intended to be streamed to the user.

DONE will be set when the operation is complete.

RC 0 until DONE.

Request

An !!ipc_request must contain one COMMAND.

GET

Retrieve CFG and STATE

OP: GET

Only one response will be sent and it will not be in a sequence.

CFG_WRITE

Persists the active configuration to cfg.yaml:

OP: CFG_WRITE

CFG_SET

Mutate multiple configuration values.

CFG containing only the desired elements to change e.g.:

OP: CFG_SET
CFG:
  SCALING: OFF
  ORDER:
    - "one"
    - "two"

CFG_DEL

Remove multiple configuration values.

Only these CFG elements that may be deleted:

  • SCALE
  • MODE
  • DISABLED
  • VRR_OFF

CFG containing only the desired elements to delete e.g.:

OP: CFG_DEL
CFG:
  SCALE:
    - NAME_DESC: DEF 456
      SCALE: 1
  MODE:
    - NAME_DESC: GHI 789
  DISABLED:
    - PQR 678
    - STU 901
    - eDP-1

Examples

make examples

client-get-raw

Sends a GET and prints the raw response.

client-set-scaling

Sends a CFG_SET to reset SCALING. Unpacks all responses and prints some config and head states as the operation progresses.

poke-server

Validates and prints client and server readiness for IPC.