! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
low-battery notifications
Status:
RESOLVED: WONTFIX
Severity:
enhancement
Product:
Xfce4-battery-plugin
Component:
General

Comments

Description Brian J. Tarricone (not reading bugmail) 2008-09-11 07:32:04 CEST
Created attachment 1814 
add support for low-battery notifications

The hal_branch of xfce4-battery-plugin is currently lacking any form of low-battery notifications.  My laptop has actually shut itself off a few times ever since I stopped using another app that (among many other broken things) did low-battery notifications, because I kept failing to notice the battery is low.

Attached patch adds support for three levels of notifications ('warn1', 'warn2', and 'critical'), using libnotify, or, if not present (or not working), normal GtkMessageDialogs.

It's lacking any amount of configurability -- the notification levels are hard-coded at 15%, 7%, and 3%, and the strings displayed are a little silly and could use some work.

But, it's good enough for me, so I thought I'd at least post my patch; if I don't get around to improving it, maybe someone else will.
Comment 1 Nick Schermer editbugs 2008-09-11 12:50:05 CEST
Maybe we can use the low/warning levels from HAL when they are available.
Comment 2 Florian Rivoal editbugs 2010-12-28 15:03:13 CET
Thanks for sharing, but I don't plan to support the hal branch. Hal itself is deprecated, and trying to replace the entire backend with either hal or some more modern replacement would cut the plugin off platforms where they are not available.

Bug #4375

Reported by:
Brian J. Tarricone (not reading bugmail)
Reported on: 2008-09-11
Last modified on: 2010-12-28

People

Assignee:
Xfce-Goodies Maintainers
CC List:
1 user

Version

Version:
0.5.1 or older

Attachments

add support for low-battery notifications (8.50 KB, patch)
2008-09-11 07:32 CEST , Brian J. Tarricone (not reading bugmail)
no flags

Additional information