diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-05-26 10:46:05 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-05-26 10:46:05 -0300 |
commit | ea0e02a5e78021c545902fc0ad61a0eccf9c24e5 (patch) | |
tree | 0c949d143e1c6fcad93d275be4e4d1edf37c3507 /xalarm | |
parent | d831c31bcc68fd65522c1908e101d12dc960f73a (diff) | |
download | utils-x11-ea0e02a5e78021c545902fc0ad61a0eccf9c24e5.tar.gz utils-x11-ea0e02a5e78021c545902fc0ad61a0eccf9c24e5.tar.bz2 |
Xalarm: display iteration number at loop mode
Diffstat (limited to 'xalarm')
-rwxr-xr-x | xalarm | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 $* |