From 258bb37533f6260745e5d860f6401db1c0b09fc9 Mon Sep 17 00:00:00 2001 From: quadbyte Date: Fri, 15 Aug 2025 22:06:39 -0400 Subject: [PATCH] Post refactoring fixes 2/? --- Commons/Settings.qml | 1 - Modules/Bar/ActiveWindow.qml | 9 +++++---- Modules/Bar/WiFiMenu.qml | 4 ++-- {Commons => Modules/IPC}/IPCManager.qml | 0 Modules/SettingsPanel/Tabs/BarTab.qml | 9 --------- Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml | 3 ++- Modules/SidePanel/Cards/WeatherCard.qml | 3 ++- Services/ColorSchemesService.qml | 1 + Services/WorkspacesService.qml | 2 +- shell.qml | 1 + 10 files changed, 14 insertions(+), 19 deletions(-) rename {Commons => Modules/IPC}/IPCManager.qml (100%) diff --git a/Commons/Settings.qml b/Commons/Settings.qml index f8cc593..32430e4 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -75,7 +75,6 @@ Singleton { property bool showActiveWindow: true property bool showSystemInfo: false property bool showMedia: false - property bool showTaskbar: false property list monitors: [] } diff --git a/Modules/Bar/ActiveWindow.qml b/Modules/Bar/ActiveWindow.qml index 366e1d3..4e5aafd 100644 --- a/Modules/Bar/ActiveWindow.qml +++ b/Modules/Bar/ActiveWindow.qml @@ -5,6 +5,7 @@ import qs.Commons import qs.Services import qs.Widgets + Row { id: layout anchors.verticalCenter: parent.verticalCenter @@ -27,7 +28,7 @@ Row { // Update text when window changes Connections { - target: typeof Niri !== "undefined" ? Niri : null + target: typeof NiriService !== "undefined" ? NiriService : null function onFocusedWindowIndexChanged() { // Check if window actually changed if (NiriService.focusedWindowIndex !== lastWindowIndex) { @@ -92,13 +93,13 @@ Row { function getDisplayText() { // Check if Niri service is available - if (typeof Niri === "undefined") { + if (typeof NiriService === "undefined") { return "" } // Get the focused window data - const focusedWindow = NiriService.focusedWindowIndex >= 0 - && NiriService.focusedWindowIndex < NiriService.windows.length ? NiriService.windows[NiriService.focusedWindowIndex] : null + const focusedWindow = NiriService.focusedWindowIndex >= 0 && NiriService.focusedWindowIndex + < NiriService.windows.length ? NiriService.windows[NiriService.focusedWindowIndex] : null if (!focusedWindow) { return "" diff --git a/Modules/Bar/WiFiMenu.qml b/Modules/Bar/WiFiMenu.qml index e052a11..e0c37df 100644 --- a/Modules/Bar/WiFiMenu.qml +++ b/Modules/Bar/WiFiMenu.qml @@ -294,8 +294,8 @@ NLoader { } NText { - visible: NetworkService.connectStatusSsid === modelData.ssid && NetworkService.connectStatus === "error" - && network.connectError.length > 0 + visible: NetworkService.connectStatusSsid === modelData.ssid + && NetworkService.connectStatus === "error" && network.connectError.length > 0 text: NetworkService.connectError color: Colors.mError font.pointSize: Style.fontSizeSmall * scaling diff --git a/Commons/IPCManager.qml b/Modules/IPC/IPCManager.qml similarity index 100% rename from Commons/IPCManager.qml rename to Modules/IPC/IPCManager.qml diff --git a/Modules/SettingsPanel/Tabs/BarTab.qml b/Modules/SettingsPanel/Tabs/BarTab.qml index 892fc96..4698432 100644 --- a/Modules/SettingsPanel/Tabs/BarTab.qml +++ b/Modules/SettingsPanel/Tabs/BarTab.qml @@ -58,15 +58,6 @@ ColumnLayout { } } - NToggle { - label: "Show Taskbar" - description: "Display a taskbar showing currently open windows" - value: Settings.data.bar.showTaskbar - onToggled: function (newValue) { - Settings.data.bar.showTaskbar = newValue - } - } - NToggle { label: "Show Media" description: "Display media controls and information" diff --git a/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml b/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml index 20faf93..7481da1 100644 --- a/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml +++ b/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml @@ -107,7 +107,8 @@ Item { Item { Layout.fillWidth: true Layout.preferredHeight: { - return Math.ceil(WallpapersService.wallpaperList.length / wallpaperGridView.columns) * wallpaperGridView.cellHeight + return Math.ceil( + WallpapersService.wallpaperList.length / wallpaperGridView.columns) * wallpaperGridView.cellHeight } GridView { diff --git a/Modules/SidePanel/Cards/WeatherCard.qml b/Modules/SidePanel/Cards/WeatherCard.qml index 58bf982..274689f 100644 --- a/Modules/SidePanel/Cards/WeatherCard.qml +++ b/Modules/SidePanel/Cards/WeatherCard.qml @@ -27,7 +27,8 @@ NBox { RowLayout { spacing: Style.marginSmall * scaling NText { - text: weatherReady ? LocationService.weatherSymbolFromCode(LocationService.data.weather.current_weather.weathercode) : "" + text: weatherReady ? LocationService.weatherSymbolFromCode( + LocationService.data.weather.current_weather.weathercode) : "" font.family: "Material Symbols Outlined" font.pointSize: Style.fontSizeXXL * 1.5 * scaling color: Colors.mPrimary diff --git a/Services/ColorSchemesService.qml b/Services/ColorSchemesService.qml index 2123a99..85d9c2c 100644 --- a/Services/ColorSchemesService.qml +++ b/Services/ColorSchemesService.qml @@ -4,6 +4,7 @@ import QtQuick import Qt.labs.folderlistmodel import Quickshell import Quickshell.Io +import qs.Commons Singleton { id: root diff --git a/Services/WorkspacesService.qml b/Services/WorkspacesService.qml index 1d540a6..ffa50eb 100644 --- a/Services/WorkspacesService.qml +++ b/Services/WorkspacesService.qml @@ -34,7 +34,7 @@ Singleton { } - if (typeof Niri !== "undefined") { + if (typeof NiriService !== "undefined") { isHyprland = false isNiri = true initNiri() diff --git a/shell.qml b/shell.qml index 9ab1894..5134397 100644 --- a/shell.qml +++ b/shell.qml @@ -11,6 +11,7 @@ import qs.Modules.Bar import qs.Modules.Calendar import qs.Modules.Demo import qs.Modules.Dock +import qs.Modules.IPC import qs.Modules.LockScreen import qs.Modules.Notification import qs.Modules.SettingsPanel