wip workspaces
This commit is contained in:
parent
0b7960c6e8
commit
1b6ec4828b
1 changed files with 51 additions and 0 deletions
51
shell/modules/bar/components/Workspaces.qml
Normal file
51
shell/modules/bar/components/Workspaces.qml
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.VectorImage
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
import "../../../config"
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
spacing: 4
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
|
||||||
|
model: Hyprland.workspaces
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: workspace
|
||||||
|
|
||||||
|
required property HyprlandWorkspace modelData
|
||||||
|
|
||||||
|
visible: modelData.id > 0
|
||||||
|
|
||||||
|
width: 25
|
||||||
|
height: 25
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: rectangle
|
||||||
|
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.fill: parent
|
||||||
|
color: "#161212"
|
||||||
|
radius: 8
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
id: button
|
||||||
|
anchors.centerIn: parent
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
rotation: workspace.modelData.active ? 0 : 180
|
||||||
|
|
||||||
|
icon.source: "/home/baobeld/dotfiles/quickshell/shell/assets/triangle.svg"
|
||||||
|
icon.color: "#1fb854"
|
||||||
|
|
||||||
|
// palette.button: QtColor.
|
||||||
|
|
||||||
|
onClicked: workspace.modelData.activate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue