From 3684ee2853132d466188b72149e51ce06512d192 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Tue, 14 Feb 2023 13:52:58 +0100 Subject: [PATCH] fix and improve lf preview --- .config/lf/clean | 1 - .config/lf/preview | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.config/lf/clean b/.config/lf/clean index 91a9aa566..cca92434a 100755 --- a/.config/lf/clean +++ b/.config/lf/clean @@ -1,3 +1,2 @@ #!/usr/bin/env bash kitty +kitten icat --clear --transfer-mode file - diff --git a/.config/lf/preview b/.config/lf/preview index 9a1fe8725..e93b5202d 100755 --- a/.config/lf/preview +++ b/.config/lf/preview @@ -5,7 +5,7 @@ image() { h=$3 x=$4 y=$5 - kitty +kitten icat --transfer-mode file --place "${w}x${h}@${x}x${y}" -- "$f" && exit 1 + kitty +kitten icat --clear --stdin no --silent --transfer-mode memory --place "${w}x${h}@${x}x${y}" "$f" >/dev/tty && exit 1 chafa "$f" -f symbols -s "$((w-2))x$h" && exit 1 echo -e "\e[31mImage previewer not installed\e[0m" return 1