feat: quickshell rewrite wip
This commit is contained in:
1 parent
962ae7c1c7
commit
452d7080f9
36 files changed
+677
-1685
No files matched your search
@@ -0,0 +1,43 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import "../core"
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
spacing: 4
|
||||
|
||||
property var monitor: null
|
||||
|
||||
Repeater {
|
||||
model: Hyprland.workspaces
|
||||
|
||||
delegate: Rectangle {
|
||||
property var ws: modelData
|
||||
|
||||
// Only show workspaces belonging to the specific monitor
|
||||
visible: root.monitor === null || (ws.monitor && ws.monitor.name === root.monitor.name)
|
||||
|
||||
width: visible ? 28 : 0
|
||||
height: visible ? 28 : 0
|
||||
radius: Theme.radius / 2
|
||||
|
||||
// Highlight if active
|
||||
color: ws.isActive ? Theme.primary : Theme.bgAlt
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: ws.id
|
||||
color: ws.isActive ? Theme.bg : Theme.fg
|
||||
font: Theme.fontBold
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: Hyprland.dispatch("workspace", ws.id)
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user