Clipboard: use a simpler working one

This commit is contained in:
Peritia 2026-03-04 09:22:39 +01:00
parent 6d9e75776d
commit ec1bfb2789

View file

@ -34,12 +34,16 @@
} }
MIME=$(file --mime-type -b "$TMP") MIME=$(file --mime-type -b "$TMP")
if [[ "$MIME" == image/* ]]; then if [[ "$MIME" == image/* ]]; then
DIM=$(identify -format "%wx%h" "$TMP" 2>/dev/null || echo "unknown") DIM=$(identify -format "%wx%h" "$TMP" 2>/dev/null || echo "unknown")
echo "Image $MIME $DIM" echo "Image $MIME $DIM"
echo "----------------------------------------" echo "----------------------------------------"
timg --quiet --center --fit "$TMP"
COLS=''${FZF_PREVIEW_COLUMNS:-80}
ROWS=''${FZF_PREVIEW_LINES:-24}
timg -g''${COLS}x''${ROWS} -C "$TMP" 2>/dev/null || \
echo "[Image preview unavailable]"
else else
echo "Text $MIME" echo "Text $MIME"
echo "----------------------------------------" echo "----------------------------------------"