nova-shell/modules/Bar.qml
2026-04-11 00:22:09 +02:00

87 lines
1.9 KiB
QML

import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Wayland
import "." as M
PanelWindow {
id: bar
required property var screen
color: "transparent"
WlrLayershell.layer: WlrLayer.Bottom
anchors {
top: true
left: true
right: true
}
implicitHeight: M.Theme.barHeight
exclusiveZone: implicitHeight
Rectangle {
anchors.fill: parent
color: M.Theme.base00
opacity: M.Theme.barOpacity
}
Item {
anchors.fill: parent
anchors.leftMargin: 8
anchors.rightMargin: 8
// ---- center (declared first so left/right can anchor to it) ----
RowLayout {
id: centerSection
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
spacing: 8
M.Clock {}
M.Notifications {}
}
// ---- left ----
RowLayout {
anchors.left: parent.left
anchors.right: centerSection.left
anchors.verticalCenter: parent.verticalCenter
spacing: 8
M.Tray {
bar: bar
}
M.WindowTitle {
Layout.maximumWidth: 400
}
}
// ---- right ----
RowLayout {
anchors.left: centerSection.right
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
spacing: 12
Item {
Layout.fillWidth: true
}
M.Mpris {}
M.Volume {}
M.Bluetooth {}
M.Backlight {}
M.Network {}
M.PowerProfile {}
M.IdleInhibitor {}
M.Weather {}
M.Temperature {}
M.Cpu {}
M.Memory {}
M.Disk {}
M.Battery {}
M.Wlogout {}
}
}
}