fancy-battery icon indicating copy to clipboard operation
fancy-battery copied to clipboard

Goes orange when battery at 100% and connected

Open dieggsy opened this issue 8 years ago • 12 comments

Not sure if this is intended behavior, but for me, the color of the battery percentage is green as it's charging, but switches to orange when it's at 100% and is connected (which implies it's discharging, which isn't the case).

dieggsy avatar Jul 10 '16 05:07 dieggsy

It's not intended behaviour for sure but I can't make anything from this scant report. Please add relevant information, including your OS, your Emacs version, etc.

swsnr avatar Jul 10 '16 07:07 swsnr

Yep, sorry about that.

OS: OSX El Capitan 10.11.5 Emacs: Emacs version 24.5.1, running from osx terminal. Additionally running smart-mode-line. Installed fancy battery through elpa (M-x package-install fancy-battery)

Please let me know what else you might need.

dieggsy avatar Jul 10 '16 08:07 dieggsy

Ok, the problem is that we don't check whether AC is plugged. We just check whether it's charging, and that's not the case anymore when the battery is fully charged.

We need to change fancy-battery-default-mode-line to extract ?L from fancy-battery-last-status, and check whether it's "AC". In that case we still need to consider the battery as "charging" and apply the charging face.

@therockmandolinist Would you like to try and open a corresponding pull request?

swsnr avatar Jul 11 '16 11:07 swsnr

@lunaryorn I'm afraid I'm not much of an emacs-lisp coder at all, so my helpfulness there would be extremely limited if at all existent.

dieggsy avatar Jul 11 '16 15:07 dieggsy

@therockmandolinist This change would be easy enough; it'd be nice opportunity to learn Emacs Lisp.

If you'd like to learn I could help you and guide you through the change 😊

swsnr avatar Jul 11 '16 16:07 swsnr

I also am not proficient in any way at using github, so there's also that, but I'd be glad to learn emacs lisp if you think it would be worthwhile.

dieggsy avatar Jul 12 '16 02:07 dieggsy

@therockmandolinist Well I'd help you with Github as well, but the question is whether you'd like to give it a shot 😊 We can do this together 👍

swsnr avatar Jul 12 '16 06:07 swsnr

@therockmandolinist That said it's totally fine if you don't want to 😊 I'll fix the issue myself at some point then.

swsnr avatar Jul 12 '16 06:07 swsnr

@lunaryorn I have a feeling it'd be better that way, but I do appreciate the encouragement.

dieggsy avatar Jul 13 '16 16:07 dieggsy

@therockmandolinist Alright, I'll fix it myself then; please be patient, though, I've been relocating recently and am quite busy currently so it'll take me a while to push a fix.

swsnr avatar Jul 13 '16 16:07 swsnr

@lunaryorn Absolutely, no rush here. Thanks!

dieggsy avatar Jul 13 '16 16:07 dieggsy

@therockmandolinist So, to be honest, I won't fix this. I'm not using this package anymore myself, and have no motivation to work on it anymore.

I'm sorry but if you don't fix it yourself, you'll have to live with the bug now.

swsnr avatar Oct 31 '16 09:10 swsnr