Add task due notify
This commit is contained in:
11
home/sam/bin/task-due-notify.sh
Executable file
11
home/sam/bin/task-due-notify.sh
Executable 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
|
||||
Reference in New Issue
Block a user