#!/bin/bash # # Simple alarm applicaton # See discussion at https://www.reddit.com/r/Gentoo/comments/1rryh1/kalarm_replacement/ # # Delay DELAY="${1:-10m}" # Message shift MESSAGE="${*:-Alarm!}" # AT(1) implementation # Example run: xalarm 1minute mymessage #echo "xmessage $MESSAGE" | at now +$DELAY # Sleep implementation # Example run: xalarm 1m mymessage sleep $DELAY xmessage $MESSAGE