From f21d6adbd7653261f6b6aaa83d1cfe3e124a0c26 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 19 Apr 2018 10:09:14 -0300 Subject: Xalarm: support sm output --- xalarm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xalarm') diff --git a/xalarm b/xalarm index ca3613c..9405ce1 100755 --- a/xalarm +++ b/xalarm @@ -1,6 +1,7 @@ #!/bin/bash # # Simple alarm applicaton +# Example run: xalarm 1m mymessage # See discussion at https://www.reddit.com/r/Gentoo/comments/1rryh1/kalarm_replacement/ # @@ -28,9 +29,12 @@ function xalarm_set { #echo "xmessage $MESSAGE" | at now +$DELAY # Sleep implementation - # Example run: xalarm 1m mymessage sleep $DELAY - xmessage $MESSAGE + if which sm 2> /dev/null; then + sm $MESSAGE + else + xmessage $MESSAGE + fi } # Cancel alarms -- cgit v1.2.3