commit ce2e0431208df6581ffbe80cb397e4f6dd8b2cec
parent 49f83b383d9048ce3d620a91a4005245aa1599dc
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Mon, 23 Dec 2024 11:37:28 +0100
Revert "Added notify-loop"
This reverts commit 49f83b383d9048ce3d620a91a4005245aa1599dc.
Diffstat:
M | event | | | 19 | ------------------- |
1 file changed, 0 insertions(+), 19 deletions(-)
diff --git a/event b/event
@@ -7,7 +7,6 @@
file="$HOME/box/events" # Change to $XDG_DATA_HOME/events or whatever
editor=${EDITOR:-vi}
-notify=${NOTIFY:-"notify push"}
usage() {
echo "Usage: event [command]"
@@ -20,8 +19,6 @@ usage() {
echo " date: now, n; today, t; tomorrow, tm;"
echo " week, w; nextweek, nw;"
echo " future, f; past, p"
- echo " notify-loop Notify of all past events, then start a loop that"
- echo " checks for events every minute and notifies"
}
secondstoday() {
@@ -151,22 +148,6 @@ case "$1" in
list)
cat "$file" | list $2 | sort
;;
- notify-loop)
- clean="sed -E 's/....-..-.. .{1,2}:..[[:space:]]*//g'"
- cat "$file" | list past | sort | \
- sed -E 's/....-..-.. .{1,2}:..[[:space:]]*//g' | \
- while read text; do
- $notify "$text"
- done &
- while true; do
- cat "$file" | list now | sort | \
- sed -E 's/....-..-.. .{1,2}:..[[:space:]]*//g' | \
- while read text; do
- $notify "$text"
- done &
- sleep $((60 - $(date +%-S)))
- done
- ;;
*)
usage
;;