summaryrefslogtreecommitdiff
path: root/mut/lf/scope
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2024-04-19 17:39:16 +0200
committerMike Vink <mike@pionative.com>2024-04-19 17:39:16 +0200
commite39341f567c74f88a3610adce25d42e2a3666a91 (patch)
treef12f8cf89eea186c2a005613ff07832169da22da /mut/lf/scope
parent985cac44e0c7b33763d0f9d26842ad5325a4a303 (diff)
update from lemptop
Diffstat (limited to 'mut/lf/scope')
-rwxr-xr-xmut/lf/scope2
1 files changed, 2 insertions, 0 deletions
diff --git a/mut/lf/scope b/mut/lf/scope
index 5571d42..57c0ed9 100755
--- a/mut/lf/scope
+++ b/mut/lf/scope
@@ -8,6 +8,8 @@ IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
image() {
if [ -f "$1" ] && command -V kitten >/dev/null 2>&1; then
kitten icat --transfer-mode file --stdin no --place "${2}x${3}@${4}x${5}" "$1" < /dev/null > /dev/tty
+ elif [ -f "$1" ] && [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1; then
+ printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2-1))" "$(($3-1))" "$1" > "$FIFO_UEBERZUG"
else
mediainfo "$6"
fi