diff options
author | awy <awy@tutamail.com> | 2024-08-19 18:13:35 +0300 |
---|---|---|
committer | awy <awy@tutamail.com> | 2024-08-19 18:13:35 +0300 |
commit | f326a862cbed691774901be046cc352f2bbc8cdd (patch) | |
tree | c5f1d906ec1a4b2ed3df34ee00690e656e005062 /.config/lf/scope | |
parent | 88d959b959e4e7e05755b7f340829e4241c625b8 (diff) |
lf update
Diffstat (limited to '.config/lf/scope')
-rwxr-xr-x | .config/lf/scope | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/.config/lf/scope b/.config/lf/scope index 5f892ed..b79c4b6 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -4,9 +4,8 @@ case "$(file -Lb --mime-type -- "$1")" in chafa -f sixel -s "$2x$3" --animate off --polite on "$1" exit 1 ;; - text/*) - cat "$1" - ;; + text/* | */xml | application/json | application/x-ndjson) bat -p --theme ansi --terminal-width "$(($4-2))" -f "$1" ;; + audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;; video/*) 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 | cut -d' ' -f1)" [ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0 |