diff options
| author | JP Appel <jeanpierre.appel01@gmail.com> | 2025-02-19 10:00:47 -0500 |
|---|---|---|
| committer | JP Appel <jeanpierre.appel01@gmail.com> | 2025-02-19 10:01:37 -0500 |
| commit | b707a6ab4bd8b98809c22e892e33315bfb1684c4 (patch) | |
| tree | 044af2939c4a432ab37b90ceb9a00a8027ae3d28 /scripts/timer | |
| parent | 996a1d0157193e32c6205469b42d6178f99f92c6 (diff) | |
Add minor script changes
Diffstat (limited to 'scripts/timer')
| -rwxr-xr-x | scripts/timer | 13 |
1 files changed, 13 insertions, 0 deletions
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 |
