Add task due notify

This commit is contained in:
2026-03-03 14:54:01 +11:00
parent 329703abf0
commit fa4591c6b3
5 changed files with 85 additions and 28 deletions

11
home/sam/bin/task-due-notify.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Query tasks due soon (adjust filters as needed, e.g., due.before:now+1h for 1-hour reminders)
DUE_TASKS=$(task due.before:now+1h status:pending export | jq -r '.[] | .description + " (due: " + .due + ")"')
if [ -n "$DUE_TASKS" ]; then
while IFS= read -r task; do
notify-send "Task Due Soon" "$task" # Local Mako pop-up
curl -d "Task due soon: $task" https://ntfy.lab.audasmedia.com.au/tasks # Remote ntfy.sh (or swap to your Docker URL like http://YOUR_DOCKER_IP:PORT/task_topic)
done <<< "$DUE_TASKS"
fi