some items
This commit is contained in:
@@ -6,17 +6,32 @@ import Quickshell.Hyprland
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
function getWorkspacesForMonitor(monitor) {
|
||||
let allWorkspaces = Hyprland.workspaces;
|
||||
let monitorWorkspaces = [];
|
||||
function getAllNumberedWorkspaces() {
|
||||
let allWorkspaces = Hyprland.workspaces.values;
|
||||
let filteredWorkspaces = [];
|
||||
for (let workspace in allWorkspaces) {
|
||||
let currentWorkspace = allWorkspaces[workspace];
|
||||
|
||||
if (currentWorkspace.monitor == monitor) {
|
||||
console.log("correct");
|
||||
} else {
|
||||
console.log("incorrect");
|
||||
if (!currentWorkspace.name.includes("special")) {
|
||||
if (currentWorkspace) {
|
||||
filteredWorkspaces.push(currentWorkspace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getWorkspacesForMonitor(monitor) {
|
||||
let allWorkspaces = getAllNumberedWorkspaces();
|
||||
let monitorWorkspaces = [];
|
||||
|
||||
for (let workspace in allWorkspaces) {
|
||||
let currentWorkspace = allWorkspaces[workspace];
|
||||
if (currentWorkspace.monitor == monitor) {
|
||||
console.log(currentWorkspace.id);
|
||||
if (currentWorkspace) {
|
||||
monitorWorkspaces.push(currentWorkspace);
|
||||
}
|
||||
}
|
||||
}
|
||||
return monitorWorkspaces;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user