From ea0e02a5e78021c545902fc0ad61a0eccf9c24e5 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 26 May 2018 10:46:05 -0300 Subject: Xalarm: display iteration number at loop mode --- xalarm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xalarm') diff --git a/xalarm b/xalarm index 8fbf482..575cc58 100755 --- a/xalarm +++ b/xalarm @@ -30,7 +30,7 @@ function xalarm_set { # Sleep implementation sleep $DELAY - if which sm 2> /dev/null; then + if which sm &> /dev/null; then sm -f '#ffffff' -b '#1c1c1c' $MESSAGE else xmessage $MESSAGE @@ -64,9 +64,12 @@ elif [ "$1" == "cancel" ] || [ "$1" == "kill" ]; then elif [ "$1" == "help" ] || [ "$1" == "usage" ]; then xalarm_usage elif [ "$1" == "loop" ]; then + count="0" + shift while true; do - xalarm_set $* + let count++ + xalarm_set $* $count done else xalarm_set $* -- cgit v1.2.3