Hi everyone! I’m trying to customize a battery status display on my KWGT widget and need help formatting the charging/discharging time.
KWGT provides this formula:
$if(bi(charging) = 0, Discharged, Full)$ $if(bi(charging) = 0 | bi(level) < 100, " in " + tf(bi(fullempty) - dp()))$
It works functionally, but the result looks like:
“Discharged in 9 hours”
What I really need is a more compact format like:
“9h 23m” — without any extra words.
I want it to dynamically adapt too — for example, if hours = 0, only show minutes, and vice versa.
Any idea how I can achieve this with KWGT formulas?
Thanks in advance!
