feat: latest update june 2024
This commit is contained in:
parent
f72ba5ca9d
commit
f26435d640
4 changed files with 39 additions and 58 deletions
|
@ -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 + " "
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue