fix previews
This commit is contained in:
parent
b5d9f5510a
commit
c16cc2b11d
|
@ -19,16 +19,15 @@ image() {
|
|||
}
|
||||
|
||||
video() {
|
||||
thumb="$("$HOME/.config/lf/preview/vidthumb" "$f")" || (
|
||||
thumb="$("$HOME/.config/lf/preview/vidthumb" "$f")" || {
|
||||
printf "%b" "${RED}vidthumb failed to execute${RESET}"
|
||||
return 1
|
||||
)
|
||||
}
|
||||
image "$thumb"
|
||||
}
|
||||
|
||||
text() {
|
||||
bat --color=always --style=plain --pager=never --terminal-width "$((w - 2))" "$f" && exit 1
|
||||
cat "$f"
|
||||
bat --color=always --style=plain --pager=never --terminal-width "$((w - 2))" "$@" "$f"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -93,7 +92,7 @@ if command -v gio 1>/dev/null 2>&1; then
|
|||
fi
|
||||
|
||||
case "$(file -b "$f")" in
|
||||
*text*) text "$f" ;;
|
||||
*text*) text ;;
|
||||
*)
|
||||
printf "%b" "\$(file --mime-type)\t\t\t : $filerun\n"
|
||||
[ -n "$giorun" ] && printf "%b" "\$(gio info)\t\t\t\t : $giorun\n"
|
||||
|
|
Loading…
Reference in New Issue