blob: 712ee6510adc69846495ade31e5cd135d618dae4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/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
|