1
0
Fork 0

fix previews

This commit is contained in:
Luca Bilke 2024-05-16 13:29:07 +02:00
parent b5d9f5510a
commit c16cc2b11d
1 changed files with 4 additions and 5 deletions

View File

@ -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"