aboutsummaryrefslogtreecommitdiff
path: root/xalarm
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-24 19:14:07 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-24 19:14:07 -0300
commitabb0a804c84b8a02aa889172c0e8558aed4a55fd (patch)
treee50e062f00d2ed87f78327112b2b8a89b8c3ecb6 /xalarm
parentf21d6adbd7653261f6b6aaa83d1cfe3e124a0c26 (diff)
downloadutils-x11-abb0a804c84b8a02aa889172c0e8558aed4a55fd.tar.gz
utils-x11-abb0a804c84b8a02aa889172c0e8558aed4a55fd.tar.bz2
Support for looping alarms such as a pomodoro timer
Diffstat (limited to 'xalarm')
-rwxr-xr-xxalarm7
1 files changed, 6 insertions, 1 deletions
diff --git a/xalarm b/xalarm
index 9405ce1..dd54183 100755
--- a/xalarm
+++ b/xalarm
@@ -52,7 +52,7 @@ function xalarm_cancel {
# Usage
function xalarm_usage {
- echo "usage: $BASENAME [list|cancel|kill|help|usage] [timedef] [message]"
+ echo "usage: $BASENAME [list|cancel|kill|help|usage|loop] [timedef] [message]"
exit 1
}
@@ -63,6 +63,11 @@ elif [ "$1" == "cancel" ] || [ "$1" == "kill" ]; then
xalarm_cancel $2
elif [ "$1" == "help" ] || [ "$1" == "usage" ]; then
xalarm_usage
+elif [ "$1" == "loop" ]; then
+ shift
+ while true; do
+ xalarm_set $*
+ done
else
xalarm_set $*
fi