89 lines
2.4 KiB
QML
89 lines
2.4 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: M.Theme.barPadding
|
|
anchors.rightMargin: M.Theme.barPadding
|
|
|
|
// ---- center (declared first so left/right can anchor to it) ----
|
|
RowLayout {
|
|
id: centerSection
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
spacing: M.Theme.barSpacing
|
|
|
|
M.Clock { visible: M.Modules.clock }
|
|
M.Notifications { visible: M.Modules.notifications }
|
|
}
|
|
|
|
// ---- left ----
|
|
RowLayout {
|
|
anchors.left: parent.left
|
|
anchors.right: centerSection.left
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
spacing: M.Theme.barSpacing
|
|
|
|
M.Tray {
|
|
bar: bar
|
|
visible: M.Modules.tray
|
|
}
|
|
M.WindowTitle {
|
|
Layout.maximumWidth: 400
|
|
visible: M.Modules.windowTitle
|
|
}
|
|
}
|
|
|
|
// ---- right ----
|
|
RowLayout {
|
|
anchors.left: centerSection.right
|
|
anchors.right: parent.right
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
spacing: M.Theme.barSpacing
|
|
|
|
Item {
|
|
Layout.fillWidth: true
|
|
}
|
|
M.Mpris {}
|
|
M.Volume { visible: M.Modules.volume }
|
|
M.Bluetooth {}
|
|
M.Backlight {}
|
|
M.Network { visible: M.Modules.network }
|
|
M.PowerProfile { visible: M.Modules.powerProfile }
|
|
M.IdleInhibitor { visible: M.Modules.idleInhibitor }
|
|
M.Weather { visible: M.Modules.weather }
|
|
M.Temperature { visible: M.Modules.temperature }
|
|
M.Cpu { visible: M.Modules.cpu }
|
|
M.Memory { visible: M.Modules.memory }
|
|
M.Disk { visible: M.Modules.disk }
|
|
M.Battery {}
|
|
M.Wlogout { bar: bar; visible: M.Modules.wlogout }
|
|
}
|
|
}
|
|
}
|