diff options
| author | venatio <72844565+v3natio@users.noreply.github.com> | 2024-06-02 22:40:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-02 20:40:47 +0000 |
| commit | 475e4abb4084008198f1d9a23de6450e02b074a9 (patch) | |
| tree | 6f85a8c11da3626eb4a9565120475349386b6c9e /.config | |
| parent | c95a16916d5c71288e5e49a78d0621943c89a682 (diff) | |
| download | eibhear-475e4abb4084008198f1d9a23de6450e02b074a9.tar.gz eibhear-475e4abb4084008198f1d9a23de6450e02b074a9.tar.zst eibhear-475e4abb4084008198f1d9a23de6450e02b074a9.zip | |
(lf,maimpick) added preview for .xcf files, fixed OCR selection in dmenu script (#1420)
Diffstat (limited to '.config')
| -rwxr-xr-x | .config/lf/scope | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.config/lf/scope b/.config/lf/scope index 8265a87..0d1e673 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -30,6 +30,11 @@ image/svg+xml) [ ! -f "$CACHE" ] && inkscape --convert-dpi-method=none -o "$CACHE.png" --export-overwrite -D --export-png-color-mode=RGBA_16 "$1" image "$CACHE.png" "$2" "$3" "$4" "$5" "$1" ;; + image/x-xcf) + CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')" + [ ! -f "$CACHE.jpg" ] && convert "$1[0]" "$CACHE.jpg" + image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" + ;; image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;; text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;; text/troff) man ./ "$1" | col -b ;; |
