Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batterybar: Bad output if battery unplugged #28

Open
kb100 opened this issue Jan 12, 2016 · 3 comments
Open

batterybar: Bad output if battery unplugged #28

kb100 opened this issue Jan 12, 2016 · 3 comments

Comments

@kb100
Copy link
Collaborator

kb100 commented Jan 12, 2016

@lathan

With my battery unplugged (laptop plugged into charger):

$ ./batterybar               
<span foreground="">■</span>
$ BLOCK_BUTTON=1 ./batterybar
 <span foreground="">%</span>
<span foreground="">■</span>

My acpi battery output is empty. Also note the extra space at the beginning of line 4.

@gangelop
Copy link
Contributor

Hi @kb100 . Thnx. I'll try to look into this tomorrow from my work laptop. My macbook doesn't respect my freedom enough to allow me to remove the battery to see what acpi returns.

@gangelop
Copy link
Contributor

It turns out, both my laptops are a bit weird in this area.

@kb100 could you tell me what the full output of the following commands is on your system when you have unplugged the battery and connected the charger?

acpi
acpi battery

@kb100
Copy link
Collaborator Author

kb100 commented Jan 13, 2016

Both acpi and acpi battery produce no output whatsoever when my battery is unplugged. Thus you need to account for if output is the empty string in your script. I would it expect it to be treated like the Unknown case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants