My laptop is Dell Precision 5520. And I want to find a non DE dependent way (I don't use Gnome, KDE, etc.) to alert when battery is running low e.g. 10%.
However, most of the solutions so far I found are either cron or polling to check periodically. It's not bad but I prefer event style notification. For instance, when battery is running low, an event is triggered and my script or whatever can then use notifiy-send to alert on screen or do hibernate. Unfortunately searching online using keyword like battery + event + linux + notication doesn't find related information. So my questions:
- if it's hardware dependent (such as battery event notifies OS proactively), what keyword should I use to search on, for instance, Dell's website?
- if there has such event I can exploit, where (e.x. conf files) or how should I look up or configure in os (/etc dir)?
Thanks
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Event notification (non cron/polling) when low battery
-
- Posts: 156
- Joined: 2006-07-13 08:04
- Has thanked: 3 times
Re: Event notification (non cron/polling) when low battery
What about package 'laptop-mode-tools' have you looked into something like that?
https://packages.debian.org/jessie/laptop-mode-tools
I guess you could log all the acpi events also and see what messages get sent.
https://packages.debian.org/jessie/laptop-mode-tools
I guess you could log all the acpi events also and see what messages get sent.
resigned by AI ChatGPT
-
- Posts: 156
- Joined: 2006-07-13 08:04
- Has thanked: 3 times
Re: Event notification (non cron/polling) when low battery
Never heard of that. Will check if I can get any event notification with that, and update it here. Thanks!
bw123 wrote:What about package 'laptop-mode-tools' have you looked into something like that?
https://packages.debian.org/jessie/laptop-mode-tools
I guess you could log all the acpi events also and see what messages get sent.
Re: Event notification (non cron/polling) when low battery
so what is wrong with that?shogun1234 wrote:when battery is running low, an event is triggered and my script or whatever can then use notifiy-send to alert on screen or do hibernate.
just do it (tm).
failing that, some DE's utilities work well even without the whole DE installed, e.g. xfce4-power-manager.