plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Question]: Can I get only state Charging or Uncharged without state Full

Open nxhung1610 opened this issue 2 years ago • 3 comments

What is your question?

I'm making a alert to notify if laptop is plugged in or not , but when use battery_plus in state Full, i cant detect that Laptop is charging or not. Can some one help me ?

nxhung1610 avatar Aug 28 '22 10:08 nxhung1610

I went through the source code of battery_plus for mac_os and found that if battery percentage is 95% regardless of it being plugged in or not, battery status will be returned as full. Only when the percentage goes below that is when you will get a charging or discharging status. What you are asking is pretty easy to implement into the plugin, if required. Now its up to the maintainers to decide whether to add it or not.

Chinmay-KB avatar Sep 01 '22 18:09 Chinmay-KB

It is easy to implement on one platform, it is hard to port to the other 5.

Anyone willing to submit a PR is welcome to do it, I will help with the review and test.

miquelbeltran avatar Sep 06 '22 14:09 miquelbeltran

@miquelbeltran won't this be checking if the status if full at the end of switch case?

SirusCodes avatar Oct 22 '22 22:10 SirusCodes