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

Support multiple adapters in battery module #2178

Open
hashworks opened this issue Sep 5, 2020 · 1 comment
Open

Support multiple adapters in battery module #2178

hashworks opened this issue Sep 5, 2020 · 1 comment

Comments

@hashworks
Copy link

Is your feature request related to a problem? Please describe.

I'm using a device with two possible power inputs: normal AC and a USB-C Port, which is listed in /sys/class/power_supply as ucsi-source-psy-USBC000:001. I can only select one of them to adjust the battery module, when I charge using the other the module is not aware of it.

Why does polybar need this feature?

There are increasingly amounts of devices with multiple charging adapters.

Describe the solution you'd like

It would be great to provide multiple adapters, so the module can check them both for charging input.

Describe alternatives you've considered

I can use two battery modules, but it kinda clutters my bar.

@parmort
Copy link
Contributor

parmort commented May 10, 2021

If you build from master, you might be able to jury-rig a solution by using the new module visibility commands. The IPC is on master right now, and I just submitted a PR (#2426) to change the IPC commands to actions. Then, you could write a script that would detect when an adapter is plugged in and show/hide the correct module.

This is a temporary solution, however. I will look into this a little further.

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

2 participants