aboutsummaryrefslogtreecommitdiffstats
path: root/gadgets/noisyalert.sh
blob: 75be808e48fa4647241278cd6a08ae1c681e6bab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
#
# (c) 2007 by Robert Manea
#
# A noisy alert for dzen
# 
# Syntax noisyalert.sh [Message] [TIMEOUT in seconds] | dzen2

ALERTMSG=${1:-"Alert"}
ALERTSEC=${2:-10}

RECTW=10
RECTH=10


while [ $ALERTSEC -ne 0 ]; do

	if [ `expr $ALERTSEC % 2` -eq 0 ]; then
		echo "^r(${RECTW}x${RECTH}) $ALERTMSG"
	else
		echo "^ro(${RECTW}x${RECTH}) $ALERTMSG"
	fi

	ALERTSEC=`expr $ALERTSEC - 1`
	sleep 1
done