scripts

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

commit 1f5437c47d1c3cdc0970e18a9b908a1a7321771a
parent 8594c74c5b1622a13b099927f22b96ab443bf7d8
Author: z3bra <willy@mailoo.org>
Date:   Wed Feb  5 13:35:49 +0100

Made the script more like a pager

Diffstat:
imgt | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/imgt b/imgt @@ -14,7 +14,7 @@ LINES=`tput lines` read width height <<< `echo -e "5;$FILENAME" | $W3MIMGDISPLAY` max_width=$(($FONTW * $COLUMNS)) -max_height=$(($FONTH * $(($LINES - 2)))) # substract one line for prompt +max_height=$(($FONTH * $(($LINES - 1)))) # substract one line for prompt if test $width -gt $max_width; then height=$(($height * $max_width / $width)) @@ -27,5 +27,9 @@ fi w3m_command="0;1;0;0;$width;$height;;;;;$FILENAME\n4;\n3;" +clear tput cup $(($height/$FONTH)) 0 echo -e $w3m_command|$W3MIMGDISPLAY + +read -n1 -s +clear