diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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 ----- |
