diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-09-02 17:02:13 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-09-02 17:02:13 +0530 |
| commit | 627c1f723302f949e28d9df5a3acb380186b4c44 (patch) | |
| tree | 6c2f2a9506a5926fd5176061706db9f3641803f1 /modules/office/calcurse/hooks/post-save | |
| parent | 9f214ab3276ff432f54a07d7d79f87c1a8be0991 (diff) | |
| parent | 894f96eb131427041c2bb726b7b798edf4f683dc (diff) | |
| download | home-manager-config-627c1f723302f949e28d9df5a3acb380186b4c44.tar.gz home-manager-config-627c1f723302f949e28d9df5a3acb380186b4c44.zip | |
Merge branch 'calcurse'
Diffstat (limited to 'modules/office/calcurse/hooks/post-save')
| -rw-r--r-- | modules/office/calcurse/hooks/post-save | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/office/calcurse/hooks/post-save b/modules/office/calcurse/hooks/post-save new file mode 100644 index 0000000..5d2ab1d --- /dev/null +++ b/modules/office/calcurse/hooks/post-save @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Commits and pushes the calcurse data dir after every save. +# +# Hooks hand calcurse's terminal over to whatever they run and calcurse +# waits for them to exit before redrawing, so this backgrounds the actual +# sync instead of blocking the UI on a git push. Output goes to a log +# file rather than stdout/stderr, since hooks aren't meant to be +# interactive. + +log="${XDG_DATA_HOME:-$HOME/.local/share}/calcurse/hooks.log" + +( + printf '[%s] post-save\n' "$(date '+%Y-%m-%d %H:%M:%S')" + calcurse-sync sync +) >>"$log" 2>&1 & +disown |
