diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-10 12:01:31 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-10 12:01:31 +0100 |
| commit | 4736a1a80ba984d3dfb9ff3bcfef6b63b570c6a1 (patch) | |
| tree | 1e85ea9b59afe96396a3b8eb70c04e14d3973981 /desktop | |
| parent | c484dad921d46982a675a051cf44bb6be4e14b44 (diff) | |
| download | quickshell-4736a1a80ba984d3dfb9ff3bcfef6b63b570c6a1.tar.gz quickshell-4736a1a80ba984d3dfb9ff3bcfef6b63b570c6a1.zip | |
feat(settings): motherboard row on the info page
Read from /sys/class/dmi/id/board_vendor and board_name, which are
world-readable, so no root and no dmidecode. The vendor's legal suffix
("Technology Co., Ltd.", "Inc.") is trimmed to the brand, as the GPU
row drops " Corporation".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop')
| -rw-r--r-- | desktop/Settings.qml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop/Settings.qml b/desktop/Settings.qml index 507960b..6b81586 100644 --- a/desktop/Settings.qml +++ b/desktop/Settings.qml @@ -371,6 +371,7 @@ Scope { + "printf 'kernel\\t%s\\n' \"$(uname -r)\"\n" + "printf 'host\\t%s\\n' \"$(uname -n)\"\n" + "printf 'uptime\\t%s\\n' \"$(cut -d' ' -f1 /proc/uptime)\"\n" + + "printf 'board\\t%s %s\\n' \"$(cat /sys/class/dmi/id/board_vendor)\" \"$(cat /sys/class/dmi/id/board_name)\"\n" + "printf 'cpu\\t%s\\n' \"$(sed -n 's/^model name[^:]*: //p;T;q' /proc/cpuinfo)\"\n" + "printf 'gpu\\t%s\\n' \"$(lspci | sed -n 's/.*\\(VGA\\|3D\\)[^:]*: //p' | head -1)\"\n" + "printf 'memory\\t%s\\n' \"$(sed -n 's/^MemTotal: *\\([0-9]*\\).*/\\1/p' /proc/meminfo)\"\n" @@ -430,6 +431,8 @@ Scope { ["Installed", sys.birth > 0 ? age(now - sys.birth) + " ago" : "-"], ["Host", sys.host ?? "-"], ["Uptime", sys.uptime ? age(+sys.uptime) : "-"], + // DMI vendor trimmed to the brand: "Gigabyte Technology Co., Ltd." reads Gigabyte. + ["Motherboard", (sys.board ?? "-").replace(/ Technology| Co\.,? Ltd\.?|,? Inc\.?/g, "").trim()], ["CPU", sys.cpu ?? "-"], ["GPU", (sys.gpu ?? "-").replace(" Corporation", "")], ["Memory", sys.memory ? (sys.memory / 1048576).toFixed(1) + " GiB" : "-"], |
