Initial commit
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
|
||||
|
||||
Row { // Workspace Row
|
||||
id: workspacesRow
|
||||
|
||||
required property HyprlandMonitor thisMonitor
|
||||
spacing: 8
|
||||
|
||||
Repeater { // repeats workspaces
|
||||
model: Hyprland.workspaces
|
||||
|
||||
Rectangle { //workspace
|
||||
visible: modelData.monitor === thisMonitor
|
||||
width: 32
|
||||
height: 24
|
||||
radius: 4
|
||||
color: modelData.active ? "#4a93ff": "#333333"
|
||||
border.color: "#555555"
|
||||
border.width: 2
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: Hyprland.dispatch("workspace " + modelData.id)
|
||||
}
|
||||
|
||||
Text {
|
||||
text: modelData.id
|
||||
anchors.centerIn: parent
|
||||
color: modelData.active ? "#ffffff" : "#cccccc"
|
||||
font.pixelSize: 12
|
||||
font.family: "Inter, sans-serif"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
visible: Hyprland.workspaces.length === 0
|
||||
text: "No Workspaces"
|
||||
color: "#ffffff"
|
||||
font.pixelSize: 12
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user