refactor(quickshell): simplify workspace ID handling in Workspaces.qml and Lock.qml

This commit is contained in:
ATDMA
2026-02-01 17:06:53 -05:00
parent 15ceda494e
commit 68f0355940
2 changed files with 2 additions and 4 deletions
@@ -18,8 +18,7 @@ Item {
property bool borderless: Config.options.bar.borderless
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(root.QsWindow.window?.screen)
readonly property Toplevel activeWindow: ToplevelManager.activeToplevel
// Clamp to avoid lock-screen temp workspace (2147483647 - N) leaking into UI
readonly property int effectiveActiveWorkspaceId: Math.max(1, Math.min(100, monitor?.activeWorkspace?.id ?? 1))
readonly property int effectiveActiveWorkspaceId: monitor?.activeWorkspace?.id ?? 1
readonly property int workspacesShown: Config.options.bar.workspaces.shown
readonly property int workspaceGroup: Math.floor((effectiveActiveWorkspaceId - 1) / root.workspacesShown)