diff options
author | Samuel Johnson <[email protected]> | 2025-01-23 00:41:07 -0500 |
---|---|---|
committer | Samuel Johnson <[email protected]> | 2025-01-23 00:41:07 -0500 |
commit | 52a12ad842257b6bcb267b5e0d18c3c10816cf03 (patch) | |
tree | 89028d201f571c8baf5e5a8c2ab6cbbd3c95d894 /.config/lf/previewer |
But it was a beginning
Diffstat (limited to '.config/lf/previewer')
-rw-r--r-- | .config/lf/previewer | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.config/lf/previewer b/.config/lf/previewer new file mode 100644 index 0000000..e755ce2 --- /dev/null +++ b/.config/lf/previewer @@ -0,0 +1,16 @@ +#!/usr/bin/sh +file=$1 +w=$2 +h=$3 +x=$4 +y=$5 + +case "$(file -Lb --mime-type -- "$1")" in + image/*) + kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$file" < /dev/null > /dev/tty + exit 1 + ;; + *) + pistol "$1" + ;; +esac |