mirror of
https://github.com/b-ryan/powerline-shell.git
synced 2026-09-10 07:26:28 -04:00
Merge c1e26a501b into 4b19aa47f1
This commit is contained in:
commit
b0f0f667a0
|
|
@ -6,7 +6,9 @@ class Segment(BasicSegment):
|
|||
def add_to_powerline(self):
|
||||
# See discussion in https://github.com/banga/powerline-shell/pull/204
|
||||
# regarding the directory where battery info is saved
|
||||
if os.path.exists("/sys/class/power_supply/BAT0"):
|
||||
if os.path.exists("/sys/class/power_supply/battery"):
|
||||
dir_ = "/sys/class/power_supply/battery"
|
||||
elif os.path.exists("/sys/class/power_supply/BAT0"):
|
||||
dir_ = "/sys/class/power_supply/BAT0"
|
||||
elif os.path.exists("/sys/class/power_supply/BAT1"):
|
||||
dir_ = "/sys/class/power_supply/BAT1"
|
||||
|
|
|
|||
Loading…
Reference in a new issue