Model: Add checks for more files
This commit is contained in:
parent
f3ac997826
commit
f7353a6b64
9
neofetch
9
neofetch
|
@ -41,8 +41,17 @@ getos() {
|
||||||
getmodel() {
|
getmodel() {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux")
|
"Linux")
|
||||||
|
if [ -f /sys/devices/virtual/dmi/id/product_name ] ||\
|
||||||
|
[ -f /sys/devices/virtual/dmi/id/product_version ]; then
|
||||||
model="$(cat /sys/devices/virtual/dmi/id/product_{name,version} 2>/dev/null)"
|
model="$(cat /sys/devices/virtual/dmi/id/product_{name,version} 2>/dev/null)"
|
||||||
model="${model/To Be Filled*}"
|
model="${model/To Be Filled*}"
|
||||||
|
|
||||||
|
elif [ -f /sys/firmware/devicetree/base/model ]; then
|
||||||
|
model="$(< /sys/firmware/devicetree/base/model)"
|
||||||
|
|
||||||
|
elif [ -f /tmp/sysinfo/model ]; then
|
||||||
|
model="$(< /tmp/sysinfo/model)"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X") model="$(sysctl -n hw.model)" ;;
|
"Mac OS X") model="$(sysctl -n hw.model)" ;;
|
||||||
|
|
Reference in New Issue