aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/README.md b/README.md
index 5c0e3ea..c85527c 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,28 @@ Compile-time knobs live in config.def.h. On first build the Makefile
copies it to config.h; edit config.h and re-`make` to change defaults.
+Hooks
+-----
+
+With the hooks patch applied, `timer` runs executables it finds at
+`~/.config/ttym/hooks/{on_start,on_done,on_quit}`, each with three
+arguments: mode (`countdown`/`stopwatch`), seconds, and the `-c`
+comment. Dropping in an executable file is the only thing needed to
+enable one.
+
+Three commented examples ship in `hooks/` and are installed to
+`$(PREFIX)/share/doc/ttym/hooks/` -- terminal title, desktop
+notification plus sound on completion, and a TSV record of abandoned
+sessions:
+
+ mkdir -p ~/.config/ttym/hooks
+ cp /usr/local/share/doc/ttym/hooks/on_done ~/.config/ttym/hooks/
+
+Hooks run synchronously with stdout and stderr on /dev/null, so keep
+them quick and write output to a file rather than the terminal. See
+`man timer` for the full contract.
+
+
Usage
-----