tImproved popup script and changed where it pops by default - scripts - various script and utils
 (HTM) git clone git://z3bra.org/scripts
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit d0993fca06fad00026faaf81d1160dc6144476c2
 (DIR) parent fe24d9cefd67419ad7d2e7b90a62dbb3dc6a4bdd
 (HTM) Author: z3bra <willy@mailoo.org>
       Date:   Thu,  3 Apr 2014 23:36:44 +0200
       
       Improved popup script and changed where it pops by default
       
       Diffstat:
         M popup                               |      27 ++++++++++++++-------------
       
       1 file changed, 14 insertions(+), 13 deletions(-)
       ---
 (DIR) diff --git a/popup b/popup
       t@@ -8,16 +8,21 @@ SLEEP=3
        
        # bar options
        font="-*-gohufont-medium-*-*--11-*-*-*-*-*-iso10646-1"
       -bg="#1d1d1d"
       -fg="#ffffff"
       -hl="#4c4c4c"
       +bg="#00000000"
       +fg="#ffffffff"
       +hl="#ff333333"
       +
       +IFS=' x' read x y <<< `xrandr | grep '*' | sed 1q | awk '{print $1}'`
       +
        width=120
        height=20
       -offx=1790
       -offy=790
       +offx=$(( $x - $width - 40 ))
       +offy=$(( $y - $height - 0))
       +
       +geom=${width}x${height}+${offx}+${offy}
        
        usage() {
       -    echo "`basename $0` [-hb] [-d delay] [-x offx] [-y offy] [-w width] [TEXT]"
       +    echo "`basename $0` [-hb] [-d delay] [-g WxH+X+Y] [TEXT]"
        }
        
        spawn() {
       t@@ -51,7 +56,7 @@ volumebar() {
            max=10
            cur=$((`getvol value` / max))
        
       -    test "`getvol state`" = "off" && fg='#d43f10'
       +    test "`getvol state`" = "off" && fg='#ffd43f10'
        
            for v in $(seq 1 $((max - 1))); do
                if [ "$v" -lt "$cur" ]; then
       t@@ -97,21 +102,17 @@ group() {
        
        test "$#" -lt 1 && exit 1
        
       -while getopts ":bd:hlw:x:y:" opt; do
       +while getopts ":bd:g:hl" opt; do
            case $opt in
                b) BEEP=1        ;;
                l) LOOP=1        ;;
                d) SLEEP=$OPTARG ;;
       -        w) width=$OPTARG ;;
       -        x) offx=$OPTARG  ;;
       -        y) offy=$OPTARG  ;;
       +        g) geom=$OPTARG  ;;
                h) usage; exit 0 ;;
                *) usage; exit 1 ;;
            esac
        done
        
       -geom=${width}x${height}+${offx}+${offy}
       -
        shift $(( OPTIND - 1 ));
        
        case $1 in