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

Feature Request: Battery Indicator #110

Closed
christophergeiger3 opened this issue Dec 14, 2018 · 7 comments
Closed

Feature Request: Battery Indicator #110

christophergeiger3 opened this issue Dec 14, 2018 · 7 comments

Comments

@christophergeiger3
Copy link

I did some digging around and I found the file /sys/class/power_supply/BAT0/uevent on my laptop. The file displays battery info, such as the current power status and whether the laptop is charging or not.

It would be cool to parse this file, or some similar file, then draw the battery info onto the lockscreen.

@PandorasFox
Copy link

PandorasFox commented Dec 15, 2018

The main problem is that the path to the file can depend on the kernel/hardware/etc.

I think it might be useful to build a generalized way to just read a file --> output that as a text widget, but the main problem I can think of is that parsing the battery status/having a cleanly-displayable battery status would be hard without writing the parsing for it.

I've considered this in the past but generally think it wouldn't be worth it since it's a bit difficult to add/maintain new widgets/drawables.

@jakob1379
Copy link

jakob1379 commented Dec 19, 2018

You could use something like
BAT=$(ls /sys/class/power_supply/ | grep -m 1 BAT)
batteryPath='/sys/class/power_supply/'$BAT

and read the capacity directly from there.
grep -m 1 makes sure it only returns the first argument.

@PandorasFox
Copy link

PandorasFox commented Dec 19, 2018

That would work for scripts passing the battery path, but there's still several problems with writing this into i3lock as it exists / setting hooks to refresh the text buffer / etc. This is something I'd do with/after #78.

Ideally each text object would just be a file path, refresh rate, offset/length to read, error text, color, positioning, font, etc.

@PandorasFox
Copy link

Rework plans are scrapped - this won't be implemented.

@florentin-soubrand
Copy link

Is this feature re-scheduled or is it really a non subject ?

@JezerM
Copy link

JezerM commented Dec 13, 2021

As it's been said before, it won't be implemented, and I don't think it will ever.

Therefore, if you want to have a battery indicator, you could either use EWW widgets on top of i3lock or a login manager as a lock screen.

@Raymo111
Copy link
Owner

Can confirm this won't be a feature anytime soon.

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

No branches or pull requests

6 participants