qtile-extras icon indicating copy to clipboard operation
qtile-extras copied to clipboard

[feature request] battery full border color.

Open ajoino opened this issue 2 years ago • 3 comments

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?

ajoino avatar Aug 13 '22 19:08 ajoino

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: https://github.com/elParaguayo/qtile-extras/blob/159eb19b9e796b7b685c8806c40cca709ed25f59/qtile_extras/widget/upower.py#L300-L304

elParaguayo avatar Aug 15 '22 08:08 elParaguayo

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?

ajoino avatar Aug 16 '22 18:08 ajoino

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.

elParaguayo avatar Aug 19 '22 06:08 elParaguayo