diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-04-19 10:09:14 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-04-19 10:09:14 -0300 |
commit | f21d6adbd7653261f6b6aaa83d1cfe3e124a0c26 (patch) | |
tree | da3cf816e4940dd9f22732050bb728f16d732d68 /xalarm | |
parent | db828f7caec6fc3fe63efb7e6726f18f22e0c918 (diff) | |
download | utils-x11-f21d6adbd7653261f6b6aaa83d1cfe3e124a0c26.tar.gz utils-x11-f21d6adbd7653261f6b6aaa83d1cfe3e124a0c26.tar.bz2 |
Xalarm: support sm output
Diffstat (limited to 'xalarm')
-rwxr-xr-x | xalarm | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |