143 lines
3.4 KiB
QML
143 lines
3.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.Workspaces {
|
|
bar: bar
|
|
visible: M.Modules.workspaces
|
|
}
|
|
M.Tray {
|
|
bar: bar
|
|
visible: M.Modules.tray
|
|
}
|
|
M.WindowTitle {
|
|
Layout.maximumWidth: 400
|
|
visible: M.Modules.windowTitle
|
|
}
|
|
Item {
|
|
Layout.fillWidth: true
|
|
}
|
|
}
|
|
|
|
// ---- right ----
|
|
RowLayout {
|
|
anchors.left: centerSection.right
|
|
anchors.right: parent.right
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
spacing: M.Theme.barSpacing
|
|
|
|
Item {
|
|
Layout.fillWidth: true
|
|
}
|
|
|
|
// Media
|
|
M.BarGroup {
|
|
M.Mpris {}
|
|
M.Volume {
|
|
visible: M.Modules.volume
|
|
}
|
|
}
|
|
|
|
// Connectivity
|
|
M.BarGroup {
|
|
M.Network {
|
|
visible: M.Modules.network
|
|
}
|
|
M.Bluetooth {}
|
|
}
|
|
|
|
// Controls
|
|
M.BarGroup {
|
|
M.Backlight {}
|
|
M.PowerProfile {
|
|
visible: M.Modules.powerProfile
|
|
}
|
|
M.IdleInhibitor {
|
|
visible: M.Modules.idleInhibitor
|
|
}
|
|
}
|
|
|
|
// System
|
|
M.BarGroup {
|
|
M.Cpu {
|
|
visible: M.Modules.cpu
|
|
}
|
|
M.Memory {
|
|
visible: M.Modules.memory
|
|
}
|
|
M.Temperature {
|
|
visible: M.Modules.temperature
|
|
}
|
|
}
|
|
|
|
// Status
|
|
M.BarGroup {
|
|
M.Weather {
|
|
visible: M.Modules.weather
|
|
}
|
|
M.Disk {
|
|
visible: M.Modules.disk
|
|
}
|
|
M.Battery {}
|
|
}
|
|
|
|
// Power
|
|
M.Power {
|
|
bar: bar
|
|
visible: M.Modules.power
|
|
}
|
|
}
|
|
}
|
|
}
|