From: martin f. krafft Date: Thu, 1 Mar 2018 02:50:19 +0000 (+1300) Subject: rewrite to use run_at_most_every X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/cc85ba567789e2f9a33c2e99b3f9a3b550ce1722?ds=inline;hp=-c;pf=etc rewrite to use run_at_most_every --- cc85ba567789e2f9a33c2e99b3f9a3b550ce1722 diff --git a/.zsh/zshrc/parts.d/50-taskwarrior b/.zsh/zshrc/parts.d/50-taskwarrior index ba99128..1101ea1 100644 --- a/.zsh/zshrc/parts.d/50-taskwarrior +++ b/.zsh/zshrc/parts.d/50-taskwarrior @@ -19,14 +19,8 @@ if whence task >/dev/null; then alias te='t edit' alias tm='t modify' - local SENTINEL=${XDG_RUNTIME_DIR}/taskwarrior/shell_run_sentinel - mkdir --parent ${SENTINEL%/*} - # only print the tasks at most once every 30 seconds - if [[ -t 0 ]] && [[ -z ${SENTINEL}(#qNms-30) ]]; then - touch ${SENTINEL} + run_at_most_every 30s \ task 2>/dev/null || : - fi - unset SENTINEL fi # vim:ft=zsh