summaryrefslogtreecommitdiff
path: root/modules/bar/Bar.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bar/Bar.qml')
-rw-r--r--modules/bar/Bar.qml48
1 files changed, 48 insertions, 0 deletions
diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml
new file mode 100644
index 0000000..5aa18f7
--- /dev/null
+++ b/modules/bar/Bar.qml
@@ -0,0 +1,48 @@
+import "root:/widgets"
+import "root:/config"
+import Quickshell
+import Quickshell.Wayland
+
+Variants {
+ model: Quickshell.screens
+
+ WlrLayershell {
+ id: win
+
+ property var modelData
+ property bool vertical: false
+
+ screen: modelData
+ namespace: "caelestia-bar"
+ color: Appearance.alpha(Appearance.colours.base, false)
+
+ anchors {
+ top: true
+ left: true
+ right: !vertical
+ bottom: vertical
+ }
+
+ width: contents.implicitWidth + (vertical ? Appearance.padding.normal * 2 : 0)
+ height: contents.implicitHeight + (vertical ? 0 : Appearance.padding.smaller * 2)
+
+ Box {
+ id: contents
+
+ vertical: win.vertical
+ spacing: Appearance.spacing.larger
+ x: Appearance.padding.normal
+ y: vertical ? Appearance.padding.normal : Appearance.padding.smaller
+
+ OsIcon {}
+
+ Clock {
+ vertical: win.vertical
+ }
+
+ ActiveWindow {
+ vertical: win.vertical
+ }
+ }
+ }
+}