summaryrefslogtreecommitdiff
path: root/bar
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-07-08 18:25:20 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-07-08 18:25:20 +0800
commitb707a6ee3ebfb5b527af63f0eacfb63ec1a580cb (patch)
tree47008e296e936b32287c5cf9ebe065a119f5b2aa /bar
init
Diffstat (limited to 'bar')
-rw-r--r--bar/Bar.qml62
-rw-r--r--bar/Workspace.qml21
2 files changed, 83 insertions, 0 deletions
diff --git a/bar/Bar.qml b/bar/Bar.qml
new file mode 100644
index 0000000..f28b836
--- /dev/null
+++ b/bar/Bar.qml
@@ -0,0 +1,62 @@
+import "../utils"
+import "../config"
+import QtQuick
+import Quickshell
+import QtQuick.Layouts
+
+Scope {
+ id: root
+
+ Variants {
+ model: Quickshell.screens
+
+ IWindow {
+ name: "Bar"
+
+ anchors {
+ top: true
+ left: true
+ right: true
+ }
+ implicitHeight: child.implicitHeight + Bar.topMargin * 2
+
+ Rectangle {
+ id: child
+ radius: Bar.borderRadius
+ implicitHeight: Bar.height
+ implicitWidth: parent.width
+
+ anchors {
+ left: parent.left
+ right: parent.mid
+ fill: parent
+ top: parent.top
+ topMargin: Bar.topMargin
+ leftMargin: Bar.leftMargin
+ rightMargin: Bar.rightMargin
+ }
+ RowLayout {
+ anchors {
+ fill: parent
+ left: parent.left
+ }
+ Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
+ id: row
+
+ Workspace {
+ id: workspace
+ }
+ // Workspace {
+ //
+ // id: workspace2
+ // }
+ // Workspace {
+ //
+ // id: workspace3
+ // }
+ }
+
+ }
+ }
+ }
+}
diff --git a/bar/Workspace.qml b/bar/Workspace.qml
new file mode 100644
index 0000000..2f8d1ea
--- /dev/null
+++ b/bar/Workspace.qml
@@ -0,0 +1,21 @@
+import "../services"
+import QtQuick.Layouts
+import QtQuick
+import Quickshell
+
+Item {
+ Layout.preferredHeight: 50
+ Layout.preferredWidth: parent.width / 3
+
+ RowLayout {
+ anchors.fill: parent
+ spacing: 0
+ Repeater {
+ model: Hyprland.workspaces
+
+ Text {
+ text: modelData.active ? modelData.name + " (Active)" : modelData.name
+ }
+ }
+ }
+}