2025-06-24 16:57:29 -04:00
|
|
|
from theme import current_theme, default
|
|
|
|
|
|
|
|
try:
|
|
|
|
charge = open("/sys/class/power_supply/BAT1/capacity").read().strip()
|
|
|
|
status = open("/sys/class/power_supply/BAT1/status").read().strip()
|
|
|
|
|
|
|
|
if status == "Discharging":
|
|
|
|
icon = ""
|
|
|
|
else:
|
|
|
|
icon = ""
|
|
|
|
|
2025-07-01 19:18:14 -04:00
|
|
|
content = f"{icon}{charge}%"
|
2025-06-24 16:57:29 -04:00
|
|
|
except Exception:
|
|
|
|
content = None
|