quickshell/modules/bar/Bar.qml

69 lines
1.7 KiB
QML

import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Wayland
import qs
import qs.settings
Variants {
model: Quickshell.screens
delegate: WlrLayershell {
id: root
required property var modelData
property double moduleHeight: implicitHeight / 1.5
screen: modelData
anchors {
top: true
left: true
right: true
}
implicitHeight: Config.barHeight
color: Qt.rgba(Colors.base00.r, Colors.base00.g, Colors.base00.b, Config.opacity)
layer: WlrLayer.Top
RowLayout {
id: leftLayout
spacing: 5
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 10
Ws {
moduleHeight: root.moduleHeight
barScreen: root.modelData
}
ActiveWindow {
moduleHeight: root.moduleHeight
}
}
RowLayout {
id: centerLayout
anchors.centerIn: parent
spacing: 5
Clock {
moduleHeight: root.moduleHeight
}
}
RowLayout {
id: rightLayout
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
spacing: 5
anchors.rightMargin: 10
Mpris {
moduleHeight: root.moduleHeight
}
Bat {
moduleHeight: root.moduleHeight
}
Pw {
moduleHeight: root.moduleHeight
}
Tray {
moduleHeight: root.moduleHeight
}
}
}
}