Ascii: Fix ascii file not working
This commit is contained in:
parent
b22b748af9
commit
430f5af564
8
neofetch
8
neofetch
|
@ -2015,15 +2015,15 @@ image_backend() {
|
||||||
|
|
||||||
get_ascii() {
|
get_ascii() {
|
||||||
if [[ ! -f "$image_source" ||
|
if [[ ! -f "$image_source" ||
|
||||||
"$image_source" =~ (auto|ascii) ||
|
"$image_source" =~ ^(auto|ascii)$ ||
|
||||||
"$image_source" =~ \.(png|jpg|jpe|jpeg|gif) ]]; then
|
"$image_source" =~ \.(png|jpg|jpe|jpeg|gif)$ ]]; then
|
||||||
|
|
||||||
# Fallback to distro ascii mode if custom ascii isn't found.
|
# Fallback to distro ascii mode if custom ascii isn't found.
|
||||||
[[ ! "$image_source" =~ (auto|ascii) ]] && \
|
[[ ! "$image_source" =~ (auto|ascii)$ ]] && \
|
||||||
err "Ascii: Ascii file not found, using distro ascii."
|
err "Ascii: Ascii file not found, using distro ascii."
|
||||||
|
|
||||||
# Fallback to distro ascii mode if source is an image.
|
# Fallback to distro ascii mode if source is an image.
|
||||||
[[ "$image_source" =~ \.(png|jpg|jpe|jpeg|gif) ]] && \
|
[[ "$image_source" =~ \.(png|jpg|jpe|jpeg|gif)$ ]] && \
|
||||||
err "Image: Source is image file but ascii backend was selected. Using distro ascii."
|
err "Image: Source is image file but ascii backend was selected. Using distro ascii."
|
||||||
|
|
||||||
if [[ -d "/usr/share/neofetch/ascii/distro" ]]; then
|
if [[ -d "/usr/share/neofetch/ascii/distro" ]]; then
|
||||||
|
|
Reference in New Issue