diff options
| -rwxr-xr-x | bin/timer.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/timer.sh b/bin/timer.sh new file mode 100755 index 0000000..48698dd --- /dev/null +++ b/bin/timer.sh @@ -0,0 +1,21 @@ +#!/bin/sh +## SPDX-FileCopyrightText: 2022 M. Shulhan <ms@kilabit.info> +## SPDX-License-Identifier: GPL-3.0-or-later + +## +## Script to display message after X duration. +## +## Usage +## +## $ timer.sh $TIME [$MESSAGE] +## +## The $TIME parameter is any format that is acceptable by sleep, for example +## 60, 1m, 2h. +## The $MESSAGE parameter is optional. +## + +DELAY=$1 +MESSAGE=$2 + +sleep "$DELAY" +notify-send "Time out" "$MESSAGE" |
