From ec1bfb2789ab84f001529f81ba8859c443524efd Mon Sep 17 00:00:00 2001 From: Peritia Date: Wed, 4 Mar 2026 09:22:39 +0100 Subject: [PATCH] Clipboard: use a simpler working one --- nixosVista/homeManager/cliphist/main.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nixosVista/homeManager/cliphist/main.nix b/nixosVista/homeManager/cliphist/main.nix index a2014a3..7b01ace 100644 --- a/nixosVista/homeManager/cliphist/main.nix +++ b/nixosVista/homeManager/cliphist/main.nix @@ -34,12 +34,16 @@ } MIME=$(file --mime-type -b "$TMP") - if [[ "$MIME" == image/* ]]; then DIM=$(identify -format "%wx%h" "$TMP" 2>/dev/null || echo "unknown") echo "Image • $MIME • $DIM" 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 echo "Text • $MIME" echo "----------------------------------------"