aboutsummaryrefslogtreecommitdiffstats
path: root/gadgets/noisyalert.sh
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-08-05 12:45:39 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-08-05 12:45:39 +0000
commitc6884614e88d1f194f4572711b2493a6da6561c4 (patch)
treead2f6c7ae9ffbdbadc00de6cbd7190abe1e350bc /gadgets/noisyalert.sh
parente6a7733799d32bb6bf719ee34beb5b01d9db68ad (diff)
downloaddzen-c6884614e88d1f194f4572711b2493a6da6561c4.tar.gz
dzen-c6884614e88d1f194f4572711b2493a6da6561c4.zip
small readibilĘ£ty fixes
documentation typo fixes kittscanner.sh improved execution speed new noisyalert.sh gadget git-svn-id: http://dzen.googlecode.com/svn/trunk@152 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'gadgets/noisyalert.sh')
-rw-r--r--gadgets/noisyalert.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/gadgets/noisyalert.sh b/gadgets/noisyalert.sh
new file mode 100644
index 0000000..75be808
--- /dev/null
+++ b/gadgets/noisyalert.sh
@@ -0,0 +1,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
+