This commit is contained in:
Bloxx12 2025-06-24 15:51:34 +02:00
commit 334bca71fe
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E
17 changed files with 733 additions and 117 deletions

View file

@ -13,22 +13,23 @@ Rectangle {
required property ShellScreen screen
property var workspaces: Niri.workspaces
property var wsCount: Niri.workspaces.length
property var activeWorkspace: Niri.activeWorkspace
property var activeWorkspaceIndex: Niri.activeWorkspaceIndex
property int wsItemHeight: 15
property bool _: log()
function log() {
console.debug("Screen name: " + screen.name);
console.debug("Found the following workspaces:");
for (let i = 0; i < workspaces.length; i++) {
console.debug("Workspace " + workspaces[i].id + " On screen " + workspaces[i].output + " With name: " + workspaces[i].name);
// console.debug(workspaces[i].output);
}
return true;
signal workspaceAdded(workspace: var)
function onWorkspaceAdded(workspace: var) {
root.workspaces.push(workspace);
}
// property bool _: log()
// function log() {
// console.log(workspaces.values);
// return true;
// }
// Works
height: 300
@ -96,8 +97,13 @@ Rectangle {
border.color: Config.catppuccin.mantle
border.width: 0
color: Config.catppuccin.blue
// visible: wsItem.isCorrectScreen
}
}
}
Component.onCompleted: {
Niri.workspaces.forEach(workspace => {
root.workspaceAdded(workspace);
});
}
}