]> gitweb.fluxo.info Git - utils-x11.git/commitdiff
More options to xlarm
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 21 Jun 2018 23:00:50 +0000 (20:00 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 21 Jun 2018 23:00:50 +0000 (20:00 -0300)
xalarm

diff --git a/xalarm b/xalarm
index ccc211678ec2dcc534b08f85bccf2d7ed873df77..87b02376fa62cc603e488510b189c6c46e3345cf 100755 (executable)
--- a/xalarm
+++ b/xalarm
@@ -121,7 +121,7 @@ function xalarm_reset_loop {
 
 # Usage
 function xalarm_usage {
-  echo "usage: $BASENAME [list|cancel|kill|help|usage|loop|reset|reset-loop] [timedef] [message]"
+  echo "usage: $BASENAME [list|cancel|kill|resume|continue|help|usage|loop|reset|reset-loop] [timedef] [message]"
   exit 1
 }
 
@@ -145,13 +145,13 @@ trap xalarm_sigusr1 SIGUSR1
 trap xalarm_sigusr2 SIGUSR2
 
 # Dispatch
-if [ "$1" == "list" ]; then
+if [ -z "$1" ] || [ "$1" == "list" ]; then
   xalarm_list
 elif [ "$1" == "cancel" ] || [ "$1" == "kill" ]; then
   xalarm_cancel $2
 elif [ "$1" == "pause" ]; then
   xalarm_pause $2
-elif [ "$1" == "resume" ]; then
+elif [ "$1" == "resume" ] && [ "$1" == "continue" ]; then
   xalarm_resume $2
 elif [ "$1" == "reset" ]; then
   xalarm_reset $2