From 50929c4efc42b4591fdfd1e4eaae349e4b197d56 Mon Sep 17 00:00:00 2001 From: velvettear Date: Fri, 11 Mar 2022 15:59:03 +0100 Subject: [PATCH] updated docs --- README.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b36441a..5b9a7de 100644 --- a/README.md +++ b/README.md @@ -57,16 +57,24 @@ configuration is done entirely within the file `config.json`. - level: [*string*] verbosity of the log; either `debug`, `info`, `warning` or `error` - timestamp: [*string*] format string for the timestamp; review [moment.js](https://momentjs.com/docs/#/displaying/format/) for further information -### socket: [*object*] -- location: [*string*] path to the socket file; defaults to `/tmp/ninwa.sock` +### combos: [*object*] +- delay: [*number*] time in milliseconds until a combo will be reset ### watchers: [*object-array*] - device: [*string*] name of or path to an input device; ninwa automatically tries to locate the device in `/dev/input` and `/dev/input/by-id/` if only a name is given - restart: [*boolean*] restart watcher on close -- grep: [*string*] pre-filter evtest's output with grep +- sudo: [*boolean*] use sudo to start the evtest process - keys: [*object-array*] - key: [*string*] name of the key + - combo: [*string-array*] name of one or more keys (in order) + - event: [*string*] [event type](https://www.kernel.org/doc/html/latest/input/event-codes.html) to filter evtest's output for - type: [*string*] type of the key event; either `keyup`, `keydown` or `keyhold` - - delay: [*number*] time in milliseconds until the key will be registered again (mostly useful for keyhold-events) - - command: [*string*] command to execute on key press - - args: [*string-array*] arguments to pass to the executed command; variables `{{ key }}` and `{{ type }}` used in args will be replaced \ No newline at end of file + - delay: [*number*] time in milliseconds until the key will be registered again (mostly useful for keyhold-events; **unavailable for combos**) + - command: [*string*] name of the command to execute on key press / combo end + + +### commands: [*object*] +- *name*: [*object*] + - cmd: [*string*] command / path to script to execute + - args: [*string-array*] arguments to pass to the executed command; variables `{{ key }}` and `{{ type }}` used in args will be replaced + - sudo: [*boolean*] use sudo to execute the command \ No newline at end of file