[+] Linux bios detection
https://github.com/dylanaraps/neofetch/issues/2284
This commit is contained in:
@@ -76,6 +76,7 @@ print_info() {
|
|||||||
info "GPU" gpu
|
info "GPU" gpu
|
||||||
info "Memory" memory
|
info "Memory" memory
|
||||||
info "Network" network
|
info "Network" network
|
||||||
|
info "BIOS" bios
|
||||||
|
|
||||||
# info "GPU Driver" gpu_driver # Linux/macOS only
|
# info "GPU Driver" gpu_driver # Linux/macOS only
|
||||||
# info "Disk" disk
|
# info "Disk" disk
|
||||||
@@ -1384,6 +1385,27 @@ get_distro() {
|
|||||||
ascii_distro=$(trim "$distro")
|
ascii_distro=$(trim "$distro")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_bios() {
|
||||||
|
DMI="/sys/devices/virtual/dmi/id"
|
||||||
|
|
||||||
|
# TODO: Add more platform support for bios detection
|
||||||
|
case $os in
|
||||||
|
Linux)
|
||||||
|
if [[ -f "$DMI/bios_vendor" ]]; then
|
||||||
|
bios="$(< $DMI/bios_vendor)"
|
||||||
|
|
||||||
|
if [[ -f "$DMI/bios_release" ]]; then
|
||||||
|
bios+=" $(< $DMI/bios_release)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -f "$DMI/bios_date" ]]; then
|
||||||
|
bios+=" $(< $DMI/bios_date)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
get_model() {
|
get_model() {
|
||||||
case $os in
|
case $os in
|
||||||
Linux)
|
Linux)
|
||||||
@@ -6332,6 +6354,7 @@ get_args() {
|
|||||||
info "GPU Driver" gpu_driver
|
info "GPU Driver" gpu_driver
|
||||||
info "Memory" memory
|
info "Memory" memory
|
||||||
info "Network" network
|
info "Network" network
|
||||||
|
info "BIOS" bios
|
||||||
|
|
||||||
info "Disk" disk
|
info "Disk" disk
|
||||||
info "Battery" battery
|
info "Battery" battery
|
||||||
|
|||||||
Reference in New Issue
Block a user