tPossibility to handle terminal borders - scripts - various script and utils
 (HTM) git clone git://z3bra.org/scripts
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit e39bfe8b46d49b7f436d19da8d4f899143e07caf
 (DIR) parent 6e4c23ea2278df0e16cf17ca28cc76022c936ebf
 (HTM) Author: z3bra <willy@mailoo.org>
       Date:   Mon, 10 Feb 2014 17:32:50 +0100
       
       Possibility to handle terminal borders
       
       Diffstat:
         M imgt                                |       5 ++++-
       
       1 file changed, 4 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/imgt b/imgt
       t@@ -8,11 +8,14 @@ W3MIMGDISPLAY="/usr/lib/w3m/w3mimgdisplay"
        FILENAME=$1
        FONTH=14 # Size of one terminal row
        FONTW=8  # Size of one terminal column
       +BORDER=20
        COLUMNS=`tput cols`
        LINES=`tput lines`
        
        read width height <<< `echo -e "5;$FILENAME" | $W3MIMGDISPLAY`
        
       +offx=$(($BORDER / $FONTH))
       +offy=$(($BORDER / $FONTW))
        max_width=$(($FONTW * $COLUMNS))
        max_height=$(($FONTH * $LINES))
        
       t@@ -25,7 +28,7 @@ if test $height -gt $max_height; then
            height=$max_height
        fi
        
       -w3m_command="0;1;0;0;$width;$height;;;;;$FILENAME\n4;\n3;"
       +w3m_command="0;1;$offx;$offy;$width;$height;;;;;$FILENAME\n4;\n3;"
        
        clear
        tput cup $(($height/$FONTH)) 0