module/script: wip: new plugin, reads data from a user provided script/binary

This module exec’s a script (or binary), specified by the ‘path’
attribute in the configuration.

It then reads tags from the script’s stdout.

The format of the output is:

  tag|type|value
  tag|type|value
  <empty line>

I.e. the script writes N tags followed by an empty  line. This
constitutes a transaction.

When a new transaction is received, its tags replaces *all* previous
tags.
This commit is contained in:
Daniel Eklöf 2020-10-25 15:20:28 +01:00
parent cadf227bc6
commit 19fe2f5a6f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 489 additions and 0 deletions

View file

@ -43,6 +43,7 @@ EXTERN_MODULE(network);
EXTERN_MODULE(removables);
EXTERN_MODULE(river);
EXTERN_MODULE(sway_xkb);
EXTERN_MODULE(script);
EXTERN_MODULE(xkb);
EXTERN_MODULE(xwindow);
@ -119,6 +120,7 @@ init(void)
REGISTER_CORE_MODULE(river, river);
#endif
REGISTER_CORE_MODULE(sway-xkb, sway_xkb);
REGISTER_CORE_MODULE(script, script);
#if defined(HAVE_PLUGIN_xkb)
REGISTER_CORE_MODULE(xkb, xkb);
#endif