*
This commit is contained in:
cho
2024-01-27 15:42:16 +07:00
parent 0e6199ab8b
commit 9ceb9dbd33
47 changed files with 4633 additions and 267 deletions

View File

@ -53,7 +53,8 @@ case "$(file --dereference --brief --mime-type -- "$1")" in
mediainfo "$1";;
text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;;
text/troff) man ./ "$1" | col -b ;;
text/* | */xml | application/json) bat -p --terminal-width "$(($4-2))" -f "$1" ;;
text/* | */xml | application/json) highlight --out-format=ansi --width "$(($4-2))" "$1" ;;
#text/* | */xml | application/json) bat -p --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)"