diff --git a/config/quickshell/Battery.qml b/config/quickshell/Battery.qml index eb5a764e..d376150b 100644 --- a/config/quickshell/Battery.qml +++ b/config/quickshell/Battery.qml @@ -4,4 +4,14 @@ import Quickshell.Services.UPower Item { id: battery + readonly property var chargeState: UPower.displayDevice.state + readonly property bool isCharging: chargeState == UPowerDeviceState.Charging; + readonly property bool isPluggedIn: isCharging || chargeState == UPowerDeviceState.PendingCharge; + readonly property real percentage: UPower.displayDevice.percentage + readonly property bool isLow: percentage <= 0.2 + + Text { + color: "#FFFFFF" + text: percentage + } } diff --git a/config/quickshell/shell.qml b/config/quickshell/shell.qml index ea9dd8fe..acdd4ccf 100644 --- a/config/quickshell/shell.qml +++ b/config/quickshell/shell.qml @@ -74,7 +74,7 @@ ShellRoot { ColumnLayout { anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter - /* spacing: 5 */ + spacing: 15 Tray {} Battery { }