Eval colors in custom ascii files
This commit is contained in:
parent
d21285c75b
commit
62e52dd2f6
1 changed files with 3 additions and 10 deletions
13
neofetch
13
neofetch
|
@ -2215,18 +2215,11 @@ getascii () {
|
||||||
|
|
||||||
ascii="$script_dir/ascii/distro/${ascii/ *}"
|
ascii="$script_dir/ascii/distro/${ascii/ *}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# We only use eval in the distro ascii files.
|
|
||||||
print="$(eval printf "$(<"$ascii")")"
|
|
||||||
else
|
|
||||||
case "${ascii_colors[0]}" in
|
|
||||||
"distro") ascii_color="$c1" ;;
|
|
||||||
*) ascii_color="\033[38;5;${ascii_colors[0]}m" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
print="${ascii_color}$(<"$ascii")"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Eval colors
|
||||||
|
print="$(eval printf "$(<"$ascii")")"
|
||||||
|
|
||||||
# Set locale to get correct padding
|
# Set locale to get correct padding
|
||||||
export LC_ALL="$SYS_LOCALE"
|
export LC_ALL="$SYS_LOCALE"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue