Files
nix/dots/.local/share/task/scripts/sync-and-notify.sh
T
hektor 71725ce35b Add 'dots/' from commit '357b97a7692c8d5ec9666d8d7d7c98d81cb51cf0'
git-subtree-dir: dots
git-subtree-mainline: 2ad98cde17
git-subtree-split: 357b97a769
2025-10-04 18:28:04 +02:00

13 lines
294 B
Bash
Executable File

#!/usr/bin/env bash
# Redirect both stdout and stderr to notify-send as is, but set
# urgency to critical if the command fails
output="$(task rc.hooks=0 sync 2>&1)"
ret=$?
if [ $ret -ne 0 ]; then
urgency=critical
else
urgency=normal
fi
notify-send -u $urgency "Taskwarrior sync" "$output"