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 full border color. #93

Open
ajoino opened this issue Aug 13, 2022 · 3 comments
Open

[feature request] battery full border color. #93

ajoino opened this issue Aug 13, 2022 · 3 comments

Comments

@ajoino
Copy link

ajoino commented Aug 13, 2022

Hi.

I like this repository a lot, and I am willing to help with this feature request.

I would like to add a color option for the border when the battery is full.
However, I am not sure how to test those changes in my live qtile session and thus I am not sure how to make sure the changes take effect.

If this idea sounds good, would you mind describing or linking to a description on how to change and test this lib?

@elParaguayo
Copy link
Owner

It's certainly possible to do.

You'd need to add some new parameters to defaults, one for the border colour and one to set the level for treating the battery as "full".

Then, you just need to add some logic to this section to check whether the battery is full:

# Choose border colour
if (percentage <= self.percentage_critical) and not self.charging:
border = self.border_critical_colour
else:
border = self.borders[self.charging]

@ajoino
Copy link
Author

ajoino commented Aug 16, 2022

Glad to hear a positive response.

What are the best practices for developing and testing this module? Just run pip install . -e in the repo?

@elParaguayo
Copy link
Owner

Each to their own. I use a virtual environment linked to my development versions of qtile and qtile-extras and I run it in a separate tty.

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