dotfiles

andersuno dotfiles
git clone git://git.andersuno.nu/dotfiles.git
Log | Files | Refs | README

imgc (291B)


      1 #!/bin/bash
      2 
      3 W3MIMGDISPLAY="/usr/lib/w3m/w3mimgdisplay"
      4 FONTH=18 # Size of one terminal row
      5 FONTW=9 # Size of one terminal column
      6 
      7 X=$1
      8 Y=$2
      9 COLUMNS=$3
     10 LINES=$4
     11 
     12 x=$((FONTW * X))
     13 y=$((FONTH * Y))
     14 
     15 erase="6;$x;$y;$(( FONTW*COLUMNS ));$(( FONTH*LINES ))\n3;"
     16 echo -e "$erase" | $W3MIMGDISPLAY