diff --git a/README.md b/README.md index 4074da5..36fc71f 100644 --- a/README.md +++ b/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 to setup trackers of values. It requires an on_event emitter 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 -which will not be searched (it will be wrapped in `^`...`$`). +Finally, you will need to source the main library file. When +the library is in the same folder (or nearby) as the library, +this may be done as: + +```bash +. "$(dirname "$0")/track_anything.sh" +``` ### `poll` -In addition to the configuration, you must provide a poll function. - Your provided poll function must return a valid output as its first line and may provide log data on subsequent lines which will be emitted at the info level (stderr, single -v). @@ -82,4 +87,4 @@ Outputs: - output an arbitrary json value, validated by jq - args: - a validation jq query which must not fail or return null - (default: `.`) \ No newline at end of file + (default: `.`)