DistroService: rename to HostService

This commit is contained in:
Ly-sec
2025-11-13 15:41:46 +01:00
parent 1288924f87
commit 4fd5865978
4 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ NIconButton {
if (customIconPath !== "")
return customIconPath.startsWith("file://") ? customIconPath : "file://" + customIconPath
if (useDistroLogo)
return DistroService.osLogo
return HostService.osLogo
return ""
}
visible: source !== ""
+1 -1
View File
@@ -233,7 +233,7 @@ ColumnLayout {
}
NButton {
visible: !DistroService.isNixOS
visible: !HostService.isNixOS
text: I18n.tr("settings.general.launch-setup-wizard")
onClicked: {
var targetScreen = PanelService.openedPanel ? PanelService.openedPanel.screen : (Quickshell.screens.length > 0 ? Quickshell.screens[0] : null)
@@ -15,7 +15,7 @@ Singleton {
property bool isReady: false
function init() {
Logger.i("DistroService", "Service started")
Logger.i("HostService", "Service started")
}
// Internal helpers
@@ -81,7 +81,7 @@ Singleton {
return l ? l.split("=")[1].replace(/"/g, "") : ""
}
root.osPretty = val("PRETTY_NAME") || val("NAME")
Logger.i("DistroService", root.osPretty)
Logger.i("HostService", root.osPretty)
const osId = (val("ID") || "").toLowerCase()
root.isNixOS = osId === "nixos" || (root.osPretty || "").toLowerCase().includes("nixos")
@@ -91,7 +91,7 @@ Singleton {
}
root.isReady = true
} catch (e) {
Logger.w("DistroService", "failed to read os-release", e)
Logger.w("HostService", "failed to read os-release", e)
}
}
}
@@ -102,10 +102,10 @@ Singleton {
const p = String(stdout.text || "").trim()
if (code === 0 && p) {
root.osLogo = `file://${p}`
Logger.i("DistroService", "found", root.osLogo)
Logger.i("HostService", "found", root.osLogo)
} else {
root.osLogo = ""
Logger.w("DistroService", "none found")
Logger.w("HostService", "none found")
}
}
stdout: StdioCollector {}
+3 -3
View File
@@ -81,7 +81,7 @@ ShellRoot {
BatteryService.init()
IdleInhibitorService.init()
PowerProfileService.init()
DistroService.init()
HostService.init()
FontService.init()
// Only open the setup wizard for new users
@@ -128,13 +128,13 @@ ShellRoot {
function checkSetupWizard() {
// Wait for distro service
if (!DistroService.isReady) {
if (!HostService.isReady) {
Qt.callLater(checkSetupWizard)
return
}
// No setup wizard on NixOS
if (DistroService.isNixOS) {
if (HostService.isNixOS) {
Settings.data.setupCompleted = true
return
}