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

[FEAT]: Action trigger at battery percentage #564

Open
Xerionius opened this issue Feb 15, 2023 · 6 comments
Open

[FEAT]: Action trigger at battery percentage #564

Xerionius opened this issue Feb 15, 2023 · 6 comments
Labels
feature New feature or request on hold Will be done in the future

Comments

@Xerionius
Copy link

Version

2.9.1

OS

Windows 11

Device

Legion 5 Pro 16ACH

Is your feature request related to a problem?

No

How would you like the problem to be solved?

Having a certain battery percentage as a trigger for actions would be great. You should be able to specify at which battery percentage the action should trigger and whether it should trigger on rising or falling battery level.
This way you could enable conservation mode on a certain battery percentage to get around the default limit of 60 %. And you could change the refresh rate, resolution and brightness when the battery gets low.

What alternatives have you considered?

Instead of differentiating between rising and falling battery levels, it could also differentiate between "plugged in" and "not plugged in".

Additional information

No response

@Xerionius Xerionius added the feature New feature or request label Feb 15, 2023
@BartoszCichecki
Copy link
Owner

BartoszCichecki commented Feb 15, 2023

This was discussed before, but can't find the issue now. Anyway, triggering Actions at certain battery percentage is not planned, because it can't be implemented reliably: for example actions won't run when laptop is sleeping or off (naturally).

I see you mention Conservation mode limits - long story short if the 60% limit is too low for you, it kind of indicates that you use your laptop on battery, so why do you use conservation mode? (Previously discussed here: #20 (comment))

The alternative you presented is already implemented: there are actions for plugging in AC adapter.

Lastly the idea with adding "Low battery" trigger is good, let me know if you'd be interested in that.
(API ref. for myself: https://learn.microsoft.com/en-us/windows/win32/power/pbt-apmbatterylow)

@BartoszCichecki BartoszCichecki added the needs-information More information is needed label Feb 15, 2023
@Xerionius
Copy link
Author

I understand the drawbacks and for me it would still be useful. However I agree that it might not make sense for most users, unfortunately.

I use my laptop mostly on AC power but I would like to have it ready to go when I need it. At 60 % the battery just doesn't last long enough to be useful and I feel like 80 or 90 % would be a good compromise, as 90 % already decreases wear significantly compared to 100 %.

With the alternative, I was suggesting still making it dependent on battery percentage, but instead of differentiating between rising and falling, differentiating between battery and AC power, which would be the same thing in practice.

Personally I would not be that interested in a low battery trigger, because I already have set the trigger for AC power disconnection to take some power saving measures.

@BartoszCichecki BartoszCichecki added on hold Will be done in the future and removed needs-information More information is needed labels Feb 16, 2023
@BartoszCichecki
Copy link
Owner

OK, I will keep the issue open but on hold. I need to think if I can fit this into the current architecture without making major changes.

@vink2212
Copy link

vink2212 commented Jul 3, 2023

I agree with @Xerionius I've wanted a feature like this for a while. Being able to trigger actions at certain battery %ages. A disclaimer that it won't work reliably with the machine sleeping would be good so people understand the limitations of the feature.

@bcutter
Copy link

bcutter commented Oct 17, 2023

Looking forward to use this too.

@Ekscentricitet
Copy link
Contributor

I am interested in implementing the low battery trigger. I took a look into it and it would take me some time to go through the code base and understand what's happening and how I can integrate a listener for the event you linked. If you have time to sketch what changes have to be made I would give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request on hold Will be done in the future
Projects
None yet
Development

No branches or pull requests

5 participants