From d6b67fa72db6e5910fe46f18fa79b950cb83d59d Mon Sep 17 00:00:00 2001 From: mananapr Date: Sat, 2 Feb 2019 01:26:57 +0530 Subject: [PATCH] Improved w3mimg scripts --- config.h | 4 ++-- scripts/clearimg | 4 ++-- scripts/displayimg | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config.h b/config.h index f4960bd..7559b42 100644 --- a/config.h +++ b/config.h @@ -16,10 +16,10 @@ #define FILE_OPENER "xdg-open" // Display Image Script -#define DISPLAYIMG "/usr/local/bin/displayimg_uberzug" +#define DISPLAYIMG "/usr/local/bin/displayimg" // Clear Image Preview Script -#define CLEARIMG "/usr/local/bin/clearimg_uberzug" +#define CLEARIMG "/usr/local/bin/clearimg" /* diff --git a/scripts/clearimg b/scripts/clearimg index 6493c4f..99e9a51 100755 --- a/scripts/clearimg +++ b/scripts/clearimg @@ -1,7 +1,7 @@ #!/bin/bash W3MIMGDISPLAY="/usr/lib/w3m/w3mimgdisplay" -FONTH=4 # Size of one terminal row +FONTH=8 # Size of one terminal row FONTW=6 # Size of one terminal column X=$1 @@ -12,5 +12,5 @@ LINES=$4 x=$((FONTW * X)) y=$((FONTH * Y)) -erase="6;$x;$y;$(( FONTW*COLUMNS ));$(( FONTH*LINES ))\n3;" +erase="6;$x;$((y-8));$(( FONTW*COLUMNS ));$(( FONTH*LINES ))\n3;" echo -e "$erase" | $W3MIMGDISPLAY diff --git a/scripts/displayimg b/scripts/displayimg index 39d9d92..c44d8f1 100755 --- a/scripts/displayimg +++ b/scripts/displayimg @@ -3,7 +3,7 @@ # Based on script by z3bra -- 2014-01-21 W3MIMGDISPLAY="/usr/lib/w3m/w3mimgdisplay" -FONTH=4 # Size of one terminal row +FONTH=12 # Size of one terminal row FONTW=6 # Size of one terminal column X=$1 @@ -33,6 +33,6 @@ if [ "$height" -gt "$max_height" ]; then height=$max_height fi -w3m_command="0;1;$x;$y;$width;$height;;;;;$FILENAME\n4;\n3;" +w3m_command="0;1;$x;$((y-15));$width;$height;;;;;$FILENAME\n4;\n3;" echo -e "$w3m_command" | $W3MIMGDISPLAY