neofetch: Fix Chrome OS detection. Closes #1384
This commit is contained in:
parent
39d7188f4a
commit
b699d75a9e
5
neofetch
5
neofetch
|
@ -736,7 +736,7 @@ image_source="auto"
|
||||||
# XFerience, ArchMerge, Arch, Artix, Arya, Bedrock, Bitrig,
|
# XFerience, ArchMerge, Arch, Artix, Arya, Bedrock, Bitrig,
|
||||||
# BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
|
# BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
|
||||||
# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
|
# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
|
||||||
# Chapeau, Chrom, Cleanjaro, ClearOS, Clear_Linux, Clover,
|
# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
|
||||||
# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
|
# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
|
||||||
# DesaOS, Devuan, DracOS, DragonFly, Drauger, Elementary,
|
# DesaOS, Devuan, DracOS, DragonFly, Drauger, Elementary,
|
||||||
# Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
|
# Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
|
||||||
|
@ -996,7 +996,7 @@ get_distro() {
|
||||||
# While the file is a series of variables they can't be sourced
|
# While the file is a series of variables they can't be sourced
|
||||||
# by the shell since the values aren't quoted.
|
# by the shell since the values aren't quoted.
|
||||||
elif [[ -f /etc/lsb-release && $(< /etc/lsb-release) == *CHROMEOS* ]]; then
|
elif [[ -f /etc/lsb-release && $(< /etc/lsb-release) == *CHROMEOS* ]]; then
|
||||||
distro=$(awk -F '=' '/NAME|VERSION/ {printf $2 " "}' /etc/lsb-release)
|
distro='Chrome OS'
|
||||||
|
|
||||||
elif type -p guix >/dev/null; then
|
elif type -p guix >/dev/null; then
|
||||||
case $distro_shorthand in
|
case $distro_shorthand in
|
||||||
|
@ -1033,6 +1033,7 @@ get_distro() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
elif [[ $(< /proc/version) == *chrome-bot* || -f /dev/cros_ec ]]; then
|
elif [[ $(< /proc/version) == *chrome-bot* || -f /dev/cros_ec ]]; then
|
||||||
|
[[ $distro != *Chrome* ]] &&
|
||||||
case $distro_shorthand in
|
case $distro_shorthand in
|
||||||
on) distro+=" [Chrome OS]" ;;
|
on) distro+=" [Chrome OS]" ;;
|
||||||
tiny) distro="Chrome OS" ;;
|
tiny) distro="Chrome OS" ;;
|
||||||
|
|
Reference in New Issue