This commit is contained in:
2026-03-29 13:16:40 -05:00
parent adcd560180
commit 7a15a983af
26 changed files with 685 additions and 423 deletions

View File

@@ -19,13 +19,15 @@ Item {
Repeater {
id: rep
property var ws: {
let arr = [];
Hyprland.workspaces.values.forEach((w) => { if(w.id > 0) arr.push(w) })
return arr;
}
model: Hyprland.workspaces.values.filter((w) => {
if(w != null) {
if(w.id > 0) {
return true
}
}
return false
})
model: ws
WrapperMouseArea {
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
ClippingWrapperRectangle {
@@ -34,7 +36,7 @@ Item {
implicitWidth: 24
implicitHeight: 24
color: {
Hyprland.focusedWorkspace.id == rep.model[index].id
Hyprland?.focusedWorkspace?.id == rep.model[index].id
? Pywal.colors.color13
: containsMouse
? Pywal.colors.color12
@@ -48,7 +50,7 @@ Item {
text: rep.model[index].id
color: {
Hyprland.focusedWorkspace.id == rep.model[index].id
Hyprland?.focusedWorkspace?.id == rep.model[index].id
? Pywal.colors.color1
: Pywal.special.foreground
}
@@ -56,7 +58,9 @@ Item {
}
hoverEnabled: true
onClicked: {
rep.model[index].activate()
if(Hyprland?.focusedWorkspace?.id != rep.model[index].id) {
rep.model[index].activate()
}
}
}
}