From 4fd5865978ebd9a4f2b002bd17735eae2dba1769 Mon Sep 17 00:00:00 2001 From: Ly-sec Date: Thu, 13 Nov 2025 15:41:46 +0100 Subject: [PATCH] DistroService: rename to HostService --- Modules/Bar/Widgets/ControlCenter.qml | 2 +- Modules/Panels/Settings/Tabs/GeneralTab.qml | 2 +- Services/System/{DistroService.qml => HostService.qml} | 10 +++++----- shell.qml | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) rename Services/System/{DistroService.qml => HostService.qml} (91%) diff --git a/Modules/Bar/Widgets/ControlCenter.qml b/Modules/Bar/Widgets/ControlCenter.qml index 02dbff042..789bdeb72 100644 --- a/Modules/Bar/Widgets/ControlCenter.qml +++ b/Modules/Bar/Widgets/ControlCenter.qml @@ -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 !== "" diff --git a/Modules/Panels/Settings/Tabs/GeneralTab.qml b/Modules/Panels/Settings/Tabs/GeneralTab.qml index c3bdfa997..955ed3a76 100644 --- a/Modules/Panels/Settings/Tabs/GeneralTab.qml +++ b/Modules/Panels/Settings/Tabs/GeneralTab.qml @@ -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) diff --git a/Services/System/DistroService.qml b/Services/System/HostService.qml similarity index 91% rename from Services/System/DistroService.qml rename to Services/System/HostService.qml index 0865cd525..adcd766de 100644 --- a/Services/System/DistroService.qml +++ b/Services/System/HostService.qml @@ -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 {} diff --git a/shell.qml b/shell.qml index 35152cd70..fee3667c6 100644 --- a/shell.qml +++ b/shell.qml @@ -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 }