use kitty as previewer for lf

This commit is contained in:
2022-02-08 19:22:35 +03:00
parent 99d69c6448
commit 578a5bbf66
3 changed files with 20 additions and 0 deletions

14
config/lf/preview.sh Executable file
View File

@@ -0,0 +1,14 @@
#! /bin/bash
file=$1
w=$2
h=$3
x=$4
y=$5
if [[ "$(file -Lb --mime-type "$file")" =~ ^image ]]; then
kitty +icat --silent --transfer-mode file --place "${w}x${h}@${x}x${y}" "$file"
exit 1
fi
pistol "$file"