basic battery percentage for now
This commit is contained in:
parent
95fb3257fb
commit
a7cc075664
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ ShellRoot {
|
|||
ColumnLayout {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
/* spacing: 5 */
|
||||
spacing: 15
|
||||
|
||||
Tray {}
|
||||
Battery { }
|
||||
|
|
Loading…
Reference in a new issue