summaryrefslogtreecommitdiff
path: root/mut/lf/scope
diff options
context:
space:
mode:
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