Update eww-battery-monitor
This commit is contained in:
parent
a0d2b83c4f
commit
ed0b55c3b4
@ -58,7 +58,7 @@ function print_state() {
|
|||||||
percentage = state_info["percentage"]
|
percentage = state_info["percentage"]
|
||||||
tooltip = ""
|
tooltip = ""
|
||||||
if (state_info["charging"]) {
|
if (state_info["charging"]) {
|
||||||
tooltip = "Until Full: " state_info["time to full"]
|
tooltip = "Until Full: " (percentage == 100 ? "N/A" : state_info["time to full"])
|
||||||
} else {
|
} else {
|
||||||
tooltip = "Until Empty: " state_info["time to empty"]
|
tooltip = "Until Empty: " state_info["time to empty"]
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ function parse_record(record, exit_on_absent) {
|
|||||||
if (name == "") {
|
if (name == "") {
|
||||||
return 0
|
return 0
|
||||||
} else if ((! BATTERY && props["power supply"] == "yes" && \
|
} else if ((! BATTERY && props["power supply"] == "yes" && \
|
||||||
props["native-path"] ~ /BAT[0-9]+/) || name == BATTERY) {
|
props["native-path"] ~ /BAT[0-9]+/) || name == BATTERY) {
|
||||||
state_info["percentage"] = props["percentage"] + 0
|
state_info["percentage"] = props["percentage"] + 0
|
||||||
state_info["time to full"] = string_or(props["time to full"], "Unknown")
|
state_info["time to full"] = string_or(props["time to full"], "Unknown")
|
||||||
state_info["time to empty"] = string_or(props["time to empty"], "Unknown")
|
state_info["time to empty"] = string_or(props["time to empty"], "Unknown")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user