diff options
| author | Mike Vink <mike@pionative.com> | 2024-04-19 17:39:16 +0200 |
|---|---|---|
| committer | Mike Vink <mike@pionative.com> | 2024-04-19 17:39:16 +0200 |
| commit | e39341f567c74f88a3610adce25d42e2a3666a91 (patch) | |
| tree | f12f8cf89eea186c2a005613ff07832169da22da /mut/lf | |
| parent | 985cac44e0c7b33763d0f9d26842ad5325a4a303 (diff) | |
update from lemptop
Diffstat (limited to 'mut/lf')
| -rwxr-xr-x | mut/lf/cleaner | 6 | ||||
| -rwxr-xr-x | mut/lf/scope | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/mut/lf/cleaner b/mut/lf/cleaner index 1b18195..9513d38 100755 --- a/mut/lf/cleaner +++ b/mut/lf/cleaner @@ -1,2 +1,6 @@ #!/bin/sh -exec kitten icat --clear --stdin no --transfer-mode file < /dev/null > /dev/tty +if [ -n "$FIFO_UEBERZUG" ]; then + printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG" +else + exec kitten icat --clear --stdin no --transfer-mode file < /dev/null > /dev/tty +fi 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 |
