mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
hyprland: re-add special workspace filtering
This commit is contained in:
@@ -105,14 +105,17 @@ Item {
|
|||||||
|
|
||||||
function getHyprlandWorkspaces() {
|
function getHyprlandWorkspaces() {
|
||||||
const workspaces = Hyprland.workspaces?.values || []
|
const workspaces = Hyprland.workspaces?.values || []
|
||||||
if (workspaces.length === 0) return [{id: 1}]
|
if (workspaces.length === 0) return [{id: 1, name: "1"}]
|
||||||
|
|
||||||
|
const filtered = workspaces.filter(ws => ws.id > -1)
|
||||||
|
if (filtered.length === 0) return [{id: 1, name: "1"}]
|
||||||
|
|
||||||
if (!root.screenName || !SettingsData.workspacesPerMonitor) {
|
if (!root.screenName || !SettingsData.workspacesPerMonitor) {
|
||||||
return workspaces.slice().sort((a, b) => a.id - b.id)
|
return filtered.slice().sort((a, b) => a.id - b.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
const monitorWorkspaces = workspaces.filter(ws => ws.monitor?.name === root.screenName)
|
const monitorWorkspaces = filtered.filter(ws => ws.monitor?.name === root.screenName)
|
||||||
return monitorWorkspaces.length > 0 ? monitorWorkspaces.sort((a, b) => a.id - b.id) : [{id: 1}]
|
return monitorWorkspaces.length > 0 ? monitorWorkspaces.sort((a, b) => a.id - b.id) : [{id: 1, name: "1"}]
|
||||||
}
|
}
|
||||||
|
|
||||||
function getHyprlandActiveWorkspace() {
|
function getHyprlandActiveWorkspace() {
|
||||||
|
|||||||
Reference in New Issue
Block a user