feat: latest update june 2024

This commit is contained in:
ineanto 2024-06-24 23:35:37 +02:00
parent f72ba5ca9d
commit f26435d640
Signed by: ineanto
GPG key ID: E511F9CAA2F9CE84
4 changed files with 39 additions and 58 deletions

View file

@ -6,10 +6,8 @@
# A battery indicator blocklet script for i3blocks
from subprocess import check_output
import os
import re
config = dict(os.environ)
status = check_output(['acpi'], universal_newlines=True)
if not status:
@ -68,6 +66,9 @@ else:
battery = ""
color = color(percentleft)
if(percentleft >= 99):
state = "Full"
if state == "Discharging":
battery = B_DISCHARING + " "
elif state == "Full":
@ -75,7 +76,7 @@ else:
elif state == "Charging":
battery = B_CHARGING + " "
elif state == "Unknown":
battery = B_UNKNOWN + " " + B_FULL + " "
battery = B_UNKNOWN + " "
else:
battery = B_UNKNOWN + " " + B_MID + " "