mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2026-09-19 10:19:02 +05:30
refactor(battery): format energy rate output
This commit is contained in:
@@ -7,7 +7,7 @@ import Quickshell.Services.UPower
|
||||
Singleton {
|
||||
id: root
|
||||
readonly property int percentage: Math.round(UPower.displayDevice.percentage * 100)
|
||||
readonly property real energyRate: UPower.displayDevice.changeRate
|
||||
readonly property real energyRate: UPower.displayDevice.changeRate.toFixed(1)
|
||||
readonly property string iconName: root.percentage < 30 ? "battery-low.svg" : root.percentage < 70 ? "battery-medium.svg" : "battery-full.svg"
|
||||
readonly property url icon: `${Quickshell.shellPath("assets")}/icons/${root.iconName}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user