configs are here
This commit is contained in:
42
quickshell_/Workspaces.qml
Normal file
42
quickshell_/Workspaces.qml
Normal file
@@ -0,0 +1,42 @@
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Hyprland
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
spacing: 3
|
||||
|
||||
Repeater {
|
||||
model: Hyprland.workspaces
|
||||
delegate: Item {
|
||||
required property int index
|
||||
property HyprlandWorkspace index_workspace: Hyprland.workspaces.values[index]
|
||||
width: 25
|
||||
height: 30
|
||||
MouseArea {
|
||||
Rectangle {
|
||||
id: reg
|
||||
anchors.fill: parent
|
||||
color: index_workspace.focused ? "#3B3B3B" : "#808080"
|
||||
}
|
||||
Layout.fillWidth: true
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: index_workspace.id
|
||||
color: "#FFFFFF"
|
||||
font.pointSize: 10.75
|
||||
}
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onPressed: event => {
|
||||
if (event.button === Qt.LeftButton) {
|
||||
Hyprland.dispatch('workspace ' + index_workspace.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user