scripts

various script and utils
git clone git://z3bra.org/scripts
Log | Files | Refs

commit 59371792f34fc43b6ddb004ee23b1b7c780090c8
parent cdcbb9bdf8ae33acf2ce0393ff0845299529115a
Author: z3bra <willy@mailoo.org>
Date:   Fri Apr  4 16:12:02 +0200

Merge branch 'master' of z3bra.org:scripts

Conflicts:
	popup

Diffstat:
popup | 21+++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/popup b/popup @@ -10,14 +10,19 @@ SLEEP=3 font="-*-gohufont-medium-*-*--11-*-*-*-*-*-iso10646-1" bg="#00000000" fg="#ffffffff" -hl="#ff1d1d1d" +hl="#ff333333" + +IFS=' x' read x y <<< `xrandr | grep '*' | sed 1q | awk '{print $1}'` + width=120 height=20 -offx=1610 -offy=1050 +offx=$(( $x - $width - 200 )) +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() { @@ -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