tfunny script to play with borders and windows - scripts - various script and utils
 (HTM) git clone git://z3bra.org/scripts
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit c06ff97e32e184e1a37a1831fe0489d521bf8e2c
 (DIR) parent 45914312c6c8fb049def1bfc2f441edf286b9b8b
 (HTM) Author: z3bra <willy@mailoo.org>
       Date:   Thu,  5 Feb 2015 14:13:42 +0100
       
       funny script to play with borders and windows
       
       Diffstat:
         A pulse                               |      17 +++++++++++++++++
         A rainbow                             |      15 +++++++++++++++
         A randcolor                           |       6 ++++++
       
       3 files changed, 38 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/pulse b/pulse
       t@@ -0,0 +1,17 @@
       +#!/bin/sh
       +
       +FREQ=${FREQ:-0.05}
       +
       +# pulsing red
       +COLORS="443232 553232 664444 774444 885656 aa5656 bb6464 cc6464 dd7272 ff7272 dd7272 cc6464 bb6464 aa5656 885656 774444 664444 553232 443232"
       +
       +# fast blinking
       +COLORS="ffffff eeeeee dddddd cccccc bbbbbb aaaaaa 888888 777777 666666 555555 444444 555555 666666 777777 888888 aaaaaa bbbbbb cccccc dddddd eeeeee"
       +
       +while :; do
       +    for c in $COLORS; do
       +        CUR=$(pfw)
       +        test "`wattr wh $CUR`" != "`wattr wh $(lsw -r)`" && chwb -s 2 -c $c $CUR
       +        sleep $FREQ
       +    done
       +done
 (DIR) diff --git a/rainbow b/rainbow
       t@@ -0,0 +1,15 @@
       +#!/bin/sh
       +#
       +# z3bra - 2015 (c) wtfpl
       +# make the current window "rainbowish"... Awesome idea from xero@nixers.net !
       +
       +FREQ=${FREQ:-0.1}
       +COLORS="888888 8064cc 6480cc 64cccc 80cc64 cccc64 cc6464"
       +CUR=$(pfw)
       +
       +while :; do
       +    for c in $COLORS; do
       +        chwb -c $c $(pfw) 
       +        sleep $FREQ
       +    done
       +done
 (DIR) diff --git a/randcolor b/randcolor
       t@@ -0,0 +1,6 @@
       +#!/bin/sh
       +
       +for i in `seq 0 15`; do
       +    c=$(tr -cd "0-9a-f" < /dev/urandom | fold -bw 6 | sed 1q)
       +    printf "*color%d: #%s\n" "$i" "$c"
       +done