Author: Sam Boysel [sboysel@gmail.com]
Hash: caded9b68b1b7c987b19888fd16615765fe6b699
Timestamp: Tue, 31 May 2022 06:36:33 +0000 (2 years ago)

+13 -8 +/-1 browse
fix README typos and edit for clarity
1diff --git a/README.md b/README.md
2index f5a216e..f0e0a66 100644
3--- a/README.md
4+++ b/README.md
5 @@ -67,24 +67,29 @@ Example:
6
7 ### Execute command on state change
8
9- Pomo will execute the command specified in the array argument `onEvent` when the
10- state changes. The new state will be exported as an environment variable
11- `POMO_STATE` for this command. For example, to trigger a terminal bell when a
12- session complete, add the following to `config.json`
13- ```
14+ Pomo will execute an arbitrary command specified in the array argument `onEvent`
15+ when the state changes. The first element of this array should be the
16+ executable to run while the remaining elements are space delimited arguments.
17+ The new state will be exported as an environment variable `POMO_STATE` for this
18+ command. Possible state values are `RUNNING`, `PAUSED`, `BREAKING`, or
19+ `COMPLETE`.
20+
21+
22+ For example, to trigger a terminal bell when a session completes, add the
23+ following to `config.json`:
24+ ```json
25 ...
26- "onEvent": ["/bin/sh", "/path/to/script/my_script.sh"]
27+ "onEvent": ["/bin/sh", "/path/to/script/my_script.sh"],
28 ...
29 ```
30 where the contents of `my_script.sh` are
31- ```
32+ ```bash
33 #!/bin/sh
34
35 if [ "$POMO_STATE" == "COMPLETE" ] ; then
36 echo -e '\a'
37 fi
38 ```
39- Possible state values are `RUNNING`, `PAUSED`, `BREAKING`, or `COMPLETE`.
40
41 ## Integrations
42