viu in kitty
Closed this issue · 1 comments
odnar-dev commented
viu
decides which protocol to use Based on the value of $TERM
, as you see here..
so what i did is change the value of $TERM
before running viu
, then change it back.
diff --git a/bookmenu b/bookmenu
old mode 100644
new mode 100755
index 0ec8a84..d54fcdb
--- a/bookmenu
+++ b/bookmenu
@@ -35,6 +35,7 @@ main() {
next=1; count=1; max=0; down=0; fail=0; size=0;
rm $INDEX $LIST $TITLE $INFO $COVER $IMAGE $TEXT 2>/dev/null
get_index; get_list; get_title; get_info
+ RTERM=$TERM
if [[ -s $LIST ]]; then
while :; do
let limit=$max+1
@@ -48,7 +49,7 @@ main() {
size=$(cut -d"," -f2- <<< $data)
sed -n "${count}p" $TITLE | sed -e "s/.\{${width}\}/&\n/g" > $TEXT
echo -e "\nAuthor: $author\nFormat: $extension\nSize:$size" >> $TEXT
- load $link $COVER; viu -w "$width" -h "$height" $COVER > $IMAGE; termset; paste $IMAGE $TEXT
+ load $link $COVER; TERM=BOOK viu -w "$width" -h "$height" $COVER > $IMAGE; TERM=$RTERM termset; paste $IMAGE $TEXT
[[ $max == 1 ]] && prompt || { [[ $count == 1 ]] && prompt "[n]ext ";
[[ $max == "$count" ]] && [[ $down != "$count" ]] && prompt "[p]revious ";
[[ $count != 1 ]] && [[ $max != "$count" ]] && prompt "[p]revious [n]ext "; }
mariorossi77 commented
thanks