Files
dotfiles/config/modules/quickshell/quickshell/Bar.qml

74 lines
2.0 KiB
QML

// Bar.qml
import Quickshell
import Quickshell.Io
import QtQuick
import QtQuick.Layouts
Scope {
id: root
PanelWindow {
required property var modelData
screen: modelData
color: "transparent"
anchors {
top: true
left: true
right: true
}
implicitHeight: 20
RowLayout {
visible: true
height: parent.height
anchors {
top: parent.top
left: parent.left
right: parent.right
// bottomMargin: 2
leftMargin: 0
rightMargin: 0
}
RowLayout {
// Left
Layout.alignment: Qt.AlignLeft
// To make sure no children mess with the height of all the other children.
// because if one widget is too height, it'll ofset all the other children in the bar
Layout.preferredHeight: 20
Workspaces {}
}
RowLayout {
// Center
Layout.alignment: Qt.AlignCenter
Layout.preferredHeight: 20
}
RowLayout {
// Right
Layout.alignment: Qt.AlignRight
Layout.preferredHeight: 20
// spacing: 100
spacing: 10
Audio {}
BatteryWidget {}
Rectangle {
implicitWidth: clockText.width
implicitHeight: clockText.height
radius: 3.5
color: Colors.backgroundAlt
Layout.alignment: Qt.AlignCenter
Text {
id: clockText
color: Colors.textPrimary
font: "CaskaydiaCove NFM"
text: Clock.time
}
}
}
}
}
}