forked from Shinonome/dots-hyprland
refactor(quickshell): simplify workspace ID handling in Workspaces.qml and Lock.qml
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user