forked from Shinonome/dots-hyprland
systeminfo: fix distro id
This commit is contained in:
@@ -36,9 +36,9 @@ Singleton {
|
|||||||
const nameMatch = textOsRelease.match(/^NAME="(.+?)"/m)
|
const nameMatch = textOsRelease.match(/^NAME="(.+?)"/m)
|
||||||
distroName = prettyNameMatch ? prettyNameMatch[1] : (nameMatch ? nameMatch[1].replace(/Linux/i, "").trim() : "Unknown")
|
distroName = prettyNameMatch ? prettyNameMatch[1] : (nameMatch ? nameMatch[1].replace(/Linux/i, "").trim() : "Unknown")
|
||||||
|
|
||||||
// Extract the ID (LOGO field, fallback to "unknown")
|
// Extract the ID
|
||||||
const logoMatch = textOsRelease.match(/^LOGO=(.+)$/m)
|
const idMatch = textOsRelease.match(/^ID="?(.+?)"?$/m)
|
||||||
distroId = logoMatch ? logoMatch[1].replace(/"/g, "") : "unknown"
|
distroId = idMatch ? idMatch[1] : "unknown"
|
||||||
|
|
||||||
// Extract additional URLs and logo
|
// Extract additional URLs and logo
|
||||||
const homeUrlMatch = textOsRelease.match(/^HOME_URL="(.+?)"/m)
|
const homeUrlMatch = textOsRelease.match(/^HOME_URL="(.+?)"/m)
|
||||||
|
|||||||
Reference in New Issue
Block a user