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