Files
quickshell-config/bar/Bar.qml

100 lines
3.1 KiB
QML

import Quickshell
import QtQuick
import QtQuick.Layouts
import Quickshell.Wayland
import qs.common
import qs.common.widgets
Scope {
Variants {
model: Quickshell.screens
PanelWindow {
required property var modelData
screen: modelData
WlrLayershell.layer: WlrLayer.Bottom
color: "transparent"
Rectangle {
id: barBackground
anchors {
fill: parent
margins: Config.options.bar.cornerStyle === 1 ? (Appearance.sizes.hyprlandGapsOut) : 0
}
color: Config.options.bar.showBackground ? Appearance.colors.colLayer1 : "transparent"
}
anchors {
top: true
left: true
right: true
}
implicitHeight: Config.options.bar.height
RowLayout { // Left Section
id: leftSection
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: 5
}
spacing: Config.options?.bar.borderless ? 4 : 8
Workspaces {}
}
RowLayout { // Middle section
id: middleSection
anchors.centerIn: parent
spacing: Config.options?.bar.borderless ? 4 : 8
Media {
visible: true
Layout.fillWidth: true
}
}
RowLayout { // Right Section
id: rightSection
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: 5
}
spacing: Config.options?.bar.borderless ? 4 : 8
SysTray {
Layout.fillWidth: false
Layout.fillHeight: true
}
StyledText {
Layout.alignment: Qt.AlignVCenter
font.pixelSize: Appearance.font.pixelSize.larger
color: Appearance.colors.colSubtext
text: "•"
visible: true
}
NotificationIcon {
Layout.fillWidth: false
Layout.fillHeight: true
}
StyledText {
Layout.alignment: Qt.AlignVCenter
font.pixelSize: Appearance.font.pixelSize.larger
color: Appearance.colors.colSubtext
text: "•"
visible: true
}
ClockWidget {
id: clock
Layout.alignment: Qt.AlignVCenter
Layout.fillHeight: true
Layout.fillWidth: false
}
PowerButton {
Layout.fillWidth: false
Layout.fillHeight: true
}
}
}
}
}