tcorner - scripts - various script and utils
 (HTM) git clone git://z3bra.org/scripts
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       tcorner (376B)
       ---
            1 #!/bin/sh
            2 
            3 CUR=${2:-$(pfw)}
            4 ROOT=$(lsw -r)
            5 SW=$(wattr w $ROOT)
            6 SH=$(wattr h $ROOT)
            7 
            8 BW=$(wattr b $CUR)
            9 W=$(wattr w $CUR)
           10 H=$(wattr h $CUR)
           11 
           12 X=0
           13 Y=0
           14 
           15 case $1 in
           16     tr) X=$((SW - W - BW*2)) ;;
           17     bl) Y=$((SH - H - BW*2)) ;;
           18     br) X=$((SW - W - BW*2))
           19         Y=$((SH - H - BW*2)) ;;
           20     md) X=$((SW/2 - W/2 - BW))
           21         Y=$((SH/2 - H/2 - BW));;
           22 esac
           23 
           24 wtp $X $Y $W $H $CUR