From b79e9f72ce548b0880d6a2d3969ecf06273bab33 Mon Sep 17 00:00:00 2001 From: bbedward Date: Wed, 12 Nov 2025 15:52:04 -0500 Subject: [PATCH] Revert "feat: add configurable per-monitor workspace filtering and system tray monitor selection (#163)" This reverts commit 68157ca636dd53d4d0975b4f5e2825d084b6c2a6. --- Modules/DankBar/Widgets/WorkspaceSwitcher.qml | 52 ------------------- 1 file changed, 52 deletions(-) diff --git a/Modules/DankBar/Widgets/WorkspaceSwitcher.qml b/Modules/DankBar/Widgets/WorkspaceSwitcher.qml index 1bb82325..694609eb 100644 --- a/Modules/DankBar/Widgets/WorkspaceSwitcher.qml +++ b/Modules/DankBar/Widgets/WorkspaceSwitcher.qml @@ -37,8 +37,6 @@ Item { return getExtWorkspaceActiveWorkspace() } else if (CompositorService.isNiri) { return getNiriActiveWorkspace() - } else if (CompositorService.isHyprland) { - return getHyprlandActiveWorkspace() } else if (CompositorService.isDwl) { const activeTags = getDwlActiveTags() return activeTags.length > 0 ? activeTags[0] : -1 @@ -62,11 +60,6 @@ Item { const baseList = getNiriWorkspaces() return SettingsData.showWorkspacePadding ? padWorkspaces(baseList) : baseList } - if (CompositorService.isHyprland) { - const baseList = getHyprlandWorkspaces() - const filteredList = baseList.filter(ws => ws.id > -1) - return SettingsData.showWorkspacePadding ? padWorkspaces(filteredList) : filteredList - } if (CompositorService.isDwl) { const baseList = getDwlTags() return SettingsData.showWorkspacePadding ? padWorkspaces(baseList) : baseList @@ -243,51 +236,6 @@ Item { return activeWs ? activeWs.idx + 1 : 1 } - function getHyprlandWorkspaces() { - const workspaces = Hyprland.workspaces?.values || [] - - if (!root.screenName || !SettingsData.workspacesPerMonitor) { - // Show all workspaces on all monitors if per-monitor filtering is disabled - const sorted = workspaces.slice().sort((a, b) => a.id - b.id) - return sorted.length > 0 ? sorted : [{ - "id": 1, - "name": "1" - }] - } - - // Filter workspaces for this specific monitor using lastIpcObject.monitor - // This matches the approach from the original kyle-config - const monitorWorkspaces = workspaces.filter(ws => { - return ws.lastIpcObject && ws.lastIpcObject.monitor === root.screenName - }) - - if (monitorWorkspaces.length === 0) { - // Fallback if no workspaces exist for this monitor - return [{ - "id": 1, - "name": "1" - }] - } - - // Return all workspaces for this monitor, sorted by ID - return monitorWorkspaces.sort((a, b) => a.id - b.id) - } - - function getHyprlandActiveWorkspace() { - if (!root.screenName || !SettingsData.workspacesPerMonitor) { - return Hyprland.focusedWorkspace ? Hyprland.focusedWorkspace.id : 1 - } - - const monitors = Hyprland.monitors?.values || [] - const currentMonitor = monitors.find(monitor => monitor.name === root.screenName) - - if (!currentMonitor) { - return 1 - } - - return currentMonitor.activeWorkspace?.id ?? 1 - } - function getDwlTags() { if (!DwlService.dwlAvailable) { return []