alex-courtis/way-displays

Documentation about new client

Closed this issue · 6 comments

Hello,
do you have some document to how implement "The client could use the same IPC socket and YAML streaming protocol as the CLI."
our application ( a simple desktop ) runs on sway and we want dev a go app to control monitor .
Regards,
Nicolas

The messages use the same schema as cfg.yaml and there are currently 4 requests: CFG_GET, CFG_SET, CFG_DEL, CFG_WRITE

I'll put together a document with details on how each of those works, a standalone example client, as well as how to marshal requests and unmarshal responses with examples.

You can see the last three using the client: send a request with debug enabled e.g.
way-displays -L debug -s scale "Unknown 0x05EF" 2.5
will show:

CFG_SET:
  SCALE:
    - NAME_DESC: Unknown 0x05EF
      SCALE: 2.5

CFG_GET returns human readable messages. We need to add functionality to return the raw data, but that is simple and can be added at the same time as the example client.

State queries will also need to be added, say, HEADS_GET and LID_GET or maybe just DISPLAY_GET. Mutations would still be done via CFG_*.

Branch 49-yaml-schemas has been created which documents and completes the API.

IPC API
YAML Schemas
standalone example client: make example-client; ./example-client

It's not yet merged as there are a couple of niggles around the human printed messages, however it is functionally complete.

I'm excited... what's the application @limbo127 ?

Hello, sorry for the delay, I cannot get the time to try it . We have a small linux distribution for our client, with minimal gui, just a task bar. Thanks, I think we can use ipc at september.
Regards,

Hello, sorry for the delay, I cannot get the time to try it . We have a small linux distribution for our client, with minimal gui, just a task bar. Thanks, I think we can use ipc at september. Regards,

Fantastic. Let me know if you need any assstance.