From b707a6ab4bd8b98809c22e892e33315bfb1684c4 Mon Sep 17 00:00:00 2001 From: JP Appel Date: Wed, 19 Feb 2025 10:00:47 -0500 Subject: Add minor script changes --- scripts/timer | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/timer (limited to 'scripts/timer') diff --git a/scripts/timer b/scripts/timer new file mode 100755 index 0000000..886c310 --- /dev/null +++ b/scripts/timer @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +NAME="$1" +shift +TIME="$@" + +[ -z "$TIME" ] && { TIME="$NAME"; NAME="Timer"; } + +if $(sleep "$TIME"); then + notify-send -a timer "$NAME" "Elapsed: $TIME\nTimer Ended: $(date +%T)" +else + notify-send -a timer "Error" "Bad time string: $TIME" +fi -- cgit v1.2.3