quickshell
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Widgets
|
||||
|
||||
Item {
|
||||
width: 10 + rep.count * (2 * lay.spacing + 25)
|
||||
height: 30
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
anchors.fill: parent
|
||||
RowLayout {
|
||||
id: lay
|
||||
Repeater {
|
||||
id: rep
|
||||
|
||||
property var test: {
|
||||
let arr = [];
|
||||
Hyprland.workspaces.values.forEach((w) => { if(w.id > 0) arr.push(w) })
|
||||
return arr;
|
||||
}
|
||||
|
||||
model: this.test
|
||||
ClippingWrapperRectangle {
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
radius: 10
|
||||
implicitWidth: 25
|
||||
Button {
|
||||
background: Rectangle {
|
||||
color: Hyprland.focusedWorkspace.id == rep.test[index].id ? "#ffff00ff" : "#ff251555"
|
||||
anchors.fill: parent
|
||||
}
|
||||
text: rep.test[index].id
|
||||
onClicked: rep.test[index].activate()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user