diff options
author | gotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2> | 2007-08-05 12:45:39 +0000 |
---|---|---|
committer | gotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2> | 2007-08-05 12:45:39 +0000 |
commit | c6884614e88d1f194f4572711b2493a6da6561c4 (patch) | |
tree | ad2f6c7ae9ffbdbadc00de6cbd7190abe1e350bc /gadgets/kittscanner.sh | |
parent | e6a7733799d32bb6bf719ee34beb5b01d9db68ad (diff) | |
download | dzen-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/kittscanner.sh')
-rwxr-xr-x | gadgets/kittscanner.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gadgets/kittscanner.sh b/gadgets/kittscanner.sh index 0a99e64..a222e72 100755 --- a/gadgets/kittscanner.sh +++ b/gadgets/kittscanner.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# (c) 2007 by Robert Manea <rob dot manea @ gmail dot com> +# (c) 2007 by Robert Manea <rob dot manea at gmail dot com> # # KITT Scanner for dzen - a man, a car, a dzen # @@ -31,6 +31,7 @@ RECT="^r(${LED_WIDTH}x${LED_HEIGHT})" i=; j=1; SIGN='+' +# build a number list "1 2 ... $SCANNER_LEDS" nr_list_leds() { l=1 lnr=$1 @@ -42,9 +43,10 @@ nr_list_leds() { echo $NRLIST } +LED_LIST=`nr_list_leds $SCANNER_LEDS` while :; do - for i in `nr_list_leds $SCANNER_LEDS`; do + for i in $LED_LIST; do if [ "$i" -eq "$j" ]; then KBAR=${KBAR}"^p(${LED_SPACING})"${LFG}${RECT}${DFG} else @@ -58,8 +60,7 @@ while :; do if [ $SIGN = '+' ] && [ $j -ge $SCANNER_LEDS ]; then j=$SCANNER_LEDS SIGN='-' - fi - if [ $SIGN = '-' ] && [ $j -eq 1 ]; then + elif [ $SIGN = '-' ] && [ $j -eq 1 ]; then j=1 SIGN='+' fi |