add more docs for track_anything.sh
This commit is contained in:
parent
124acaa789
commit
c0ef2034ed
15
README.md
15
README.md
|
@ -9,15 +9,20 @@ Install by linking or cloning to ~/.config/eww
|
||||||
This config includes a helper bash source which may be used
|
This config includes a helper bash source which may be used
|
||||||
to setup trackers of values. It requires an on_event emitter
|
to setup trackers of values. It requires an on_event emitter
|
||||||
to already exist and should have one of the three output
|
to already exist and should have one of the three output
|
||||||
formats: integer, boolean, and string.
|
formats: integer, boolean, and string. Additionally, you will
|
||||||
|
need to provide a `poll` function which exposes the information
|
||||||
|
you care about.
|
||||||
|
|
||||||
When specifying a string output, you may include a custom regex
|
Finally, you will need to source the main library file. When
|
||||||
which will not be searched (it will be wrapped in `^`...`$`).
|
the library is in the same folder (or nearby) as the library,
|
||||||
|
this may be done as:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
. "$(dirname "$0")/track_anything.sh"
|
||||||
|
```
|
||||||
|
|
||||||
### `poll`
|
### `poll`
|
||||||
|
|
||||||
In addition to the configuration, you must provide a poll function.
|
|
||||||
|
|
||||||
Your provided poll function must return a valid output as its first
|
Your provided poll function must return a valid output as its first
|
||||||
line and may provide log data on subsequent lines which will be
|
line and may provide log data on subsequent lines which will be
|
||||||
emitted at the info level (stderr, single -v).
|
emitted at the info level (stderr, single -v).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user