Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Added get_battery to display battery status #94

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Added get_battery to display battery status #94

wants to merge 4 commits into from

Conversation

alvar0liveira
Copy link

Added get_battery to display battery level and status

@rachelambda
Copy link
Contributor

rachelambda commented Jan 15, 2021

This isn't portable, consider adding options for different OS's, such as apm on OpenBSD. Also, using a wildcard here would cause issues if multiple batteries are present.

Also, since these proc files are only one line, you might as well use read varname < filename instead of varname="$(cat filename)".

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

Successfully merging this pull request may close these issues.

2 participants