Clipboard: use a simpler working one
This commit is contained in:
parent
6d9e75776d
commit
ec1bfb2789
1 changed files with 6 additions and 2 deletions
|
|
@ -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 "----------------------------------------"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue