On Mon, 18 Nov 2013 14:28:04 +0100
richard lucassen <[email protected]> wrote:

> Ok, that's an option, I'll cook something with pidof and awk/sed/grep.

For googlers who find this interesting: this is an extremely quick and
dirty shell script for evince:

#!/bin/dash

HPOS=64
VPOS=64
HSIZE=1280
VSIZE=960
PID=$$

exec /usr/bin/evince $1 &
sleep 1
WNAME=`wmctrl -lp \
  | awk '/ '${PID}' / {for (n=5; n<=NF; n++) printf $n" "; print ""}'`
wmctrl -r "${WNAME}" -e "0,${HPOS},${VPOS},${HSIZE},${VSIZE}"

YMMV ;-)

R.

-- 
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht                                        |
+------------------------------------------------------------------+


-- 
To unsubscribe, send mail to [email protected].

Reply via email to