From d506146c55ffa28ed8f5ba2d7ebd496e60e6a8d4 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Wed, 22 Dec 2021 09:10:09 +0100 Subject: added a script to check past events and notify --- scripts/sdep-checkpast | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/sdep-checkpast (limited to 'scripts/sdep-checkpast') diff --git a/scripts/sdep-checkpast b/scripts/sdep-checkpast new file mode 100755 index 0000000..fa8164d --- /dev/null +++ b/scripts/sdep-checkpast @@ -0,0 +1,21 @@ +#!/bin/sh + +# Run this at boot to receive a notification about past events that you might +# have missed +# +# The events are read from the following files in SDEPDATA folder: +# once: events that only happen once; full date needs to be specified +# daily: events that happen every day; only specify the time in HH:MM format +# weekly: only specify Weekday + time +# monthly: only specify day of the month + time + +# Requires: notify-send. + +notify="notify-send -t 3600000" + +sdep-list past | \ +while read text; do + date=$(echo "$text" | sed 's/\t.*//') + event=$(echo "$text" | sed 's/.*\t//') + $notify "$date" "$event" +done -- cgit v1.3