Model: Add checks for more files
This commit is contained in:
parent
f3ac997826
commit
f7353a6b64
1 changed files with 11 additions and 2 deletions
9
neofetch
9
neofetch
|
@ -41,8 +41,17 @@ getos() {
|
|||
getmodel() {
|
||||
case "$os" in
|
||||
"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="${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)" ;;
|
||||
|
|
Loading…
Reference in a new issue