tMade the script more like a pager - scripts - various script and utils
(HTM) git clone git://z3bra.org/scripts
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 1f5437c47d1c3cdc0970e18a9b908a1a7321771a
(DIR) parent 8594c74c5b1622a13b099927f22b96ab443bf7d8
(HTM) Author: z3bra <willy@mailoo.org>
Date: Wed, 5 Feb 2014 13:35:49 +0100
Made the script more like a pager
Diffstat:
M imgt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/imgt b/imgt
t@@ -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))
t@@ -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