[Pkg-wmaker-commits] [wmbattery] 29/241: * Added ACPI support, including battery change detection, and battery charging time countdown timer. * Added -w parameter to configure delay time. * Added -c and -l parameters to allow user control of battery low/critical percentages. * Use constant defs from apm.h instead of nasty hardcoded numbers. * Made -Wall clean. * Reorg. * Removed -s option, just fall back to SPIC if ACPI and APM are not available.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:37:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmbattery.

commit bca77271fd83e8c51337ccdb433cd13f7b5807c3
Author: joey <joey at a4a2c43b-8ac3-0310-8836-e0e880c912e2>
Date:   Sat Apr 6 04:13:22 2002 +0000

       * Added ACPI support, including battery change detection, and battery
         charging time countdown timer.
       * Added -w parameter to configure delay time.
       * Added -c and -l parameters to allow user control of battery low/critical
         percentages.
       * Use constant defs from apm.h instead of nasty hardcoded numbers.
       * Made -Wall clean.
       * Reorg.
       * Removed -s option, just fall back to SPIC if ACPI and APM are not
         available.
---
 README               |   8 +-
 TODO                 |   1 -
 autoconf/makeinfo.in |   8 +-
 bigfont.xpm          |  20 ++---
 debian/changelog     |  15 ++++
 debian/control       |  16 ++--
 sonypi.h             |   3 +
 wmbattery.1x         |  46 +++++++----
 wmbattery.c          | 221 +++++++++++++++++++++++----------------------------
 wmbattery.h          |   6 +-
 10 files changed, 175 insertions(+), 169 deletions(-)

diff --git a/README b/README
index 78cc246..8947653 100644
--- a/README
+++ b/README
@@ -1,12 +1,12 @@
-Wmbattery displays the status of your laptop's battery in a small icon. This
+wmbattery displays the status of your laptop's battery in a small icon. This
 includes if it is plugged in, if the battery is charging, how many minutes
 of battery life remain, battery life remaining (with both a percentage and a
 graph), and battery status (high - green, low - yellow, or critical - red).
 
-Wmbattery is based heavily on wmapm by Chris D. Faulhaber <jedgar at speck.ml.org>
+wmbattery is based on wmapm by Chris D. Faulhaber <jedgar at speck.ml.org>
 -- see the copyright file for more information.
 
-Wmapm is a nice program - why have I modified it into wmbattery? Here are
+wmapm is a nice program - why have I modified it into wmbattery? Here are
 some improvements in wmbattery:
 
   - Improved icon layout. I crammed the same information into less space
@@ -17,6 +17,8 @@ some improvements in wmbattery:
   - You can run in on a different display via -d (broken in wmapm).
   - Support for getting battery status from the sonypi driver instead of APM,
     for some Sony laptops that do not have apm support.
+  - ACPI support, including multiple battery support and battery charging
+    completion countdown timer.
 
 Conversely, here are some reasons to stick with wmapm:
 
diff --git a/TODO b/TODO
index f807179..66ee2ee 100644
--- a/TODO
+++ b/TODO
@@ -2,4 +2,3 @@
   case things so it looks better.
 * Make it load up the mask from file, not #include it.
 * Allow user-settable colors, like asclock does.
-* Allow the user to define when it should display different battery colors.
diff --git a/autoconf/makeinfo.in b/autoconf/makeinfo.in
index 060c2a3..cc17c33 100644
--- a/autoconf/makeinfo.in
+++ b/autoconf/makeinfo.in
@@ -6,7 +6,7 @@ prefix=@prefix@
 srcdir=@srcdir@
 
 CC=@CC@
-CFLAGS=@CFLAGS@
+CFLAGS=@CFLAGS@ -Wall
 CPPFLAGS=@CPPFLAGS@ -DICONDIR=\"$(icondir)\"
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -18,7 +18,7 @@ VPATH=@srcdir@
 all: wmbattery
 
 clean:
-	rm -f wmbattery wmbattery.o
+	rm -f wmbattery *.o
 
 distclean: clean
 	rm -f config.status config.cache config.log makeinfo config.h
@@ -39,7 +39,7 @@ install: all
 uninstall:
 	rm -rf $(bindir)/wmbattery $(man1dir)/wmbattery.1x $(icondir)
 
-wmbattery: wmbattery.o
-	$(CC) $(LDFLAGS) $(LIBS) wmbattery.o -o wmbattery
+wmbattery: wmbattery.o acpi.o sonypi.o
+	$(CC) $(LDFLAGS) $(LIBS) wmbattery.o acpi.o sonypi.o -o wmbattery
 
 wmbattery.o: wmbattery.c wmbattery.h
diff --git a/bigfont.xpm b/bigfont.xpm
index c0ab6fd..ad69152 100644
--- a/bigfont.xpm
+++ b/bigfont.xpm
@@ -1,17 +1,17 @@
 /* XPM */
 static char * bigfont_xpm[] = {
-"73 9 5 1",
+"84 9 5 1",
 " 	c #208120812081",
 ".	c #2081B2CAAEBA",
 "X	c #000049244103",
 "o	c #104079E779E7",
 "O	c #18618A288617",
-" ....   XXXXo o....O o....o oXXXXo o....o o....O o....o o....O o....O    ",
-".    . X    . X    . X    . .    . .    X .    X X    . .    . .    .  XX",
-".    . X    . X    . X    . .    . .    X .    X X    . .    . .    .  XX",
-".    . X    . X    . X    . .    . .    X .    X X    . .    . .    .    ",
-"oXXXXo  XXXXo o....o o....o o....o o....o o....o  XXXXo o....o o....o    ",
-".    . X    . .    X X    . X    . X    . .    . X    . .    . X    .    ",
-".    . X    . .    X X    . X    . X    . .    . X    . .    . X    .  XX",
-".    . X    . .    X X    . X    . X    . .    . X    . .    . X    .  XX",
-" ....   XXXXo o....o o....o  XXXXo o....o o....o  XXXXo o....o o....o    "};
+" ....   XXXXo o....O o....o oXXXXo o....o o....O o....o o....O o....O               ",
+".    . X    . X    . X    . .    . .    X .    X X    . .    . .    .  XX           ",
+".    . X    . X    . X    . .    . .    X .    X X    . .    . .    .  XX           ",
+".    . X    . X    . X    . .    . .    X .    X X    . .    . .    .               ",
+"oXXXXo  XXXXo o....o o....o o....o o....o o....o  XXXXo o....o o....o       o.....o ",
+".    . X    . .    X X    . X    . X    . .    . X    . .    . X    .               ",
+".    . X    . .    X X    . X    . X    . .    . X    . .    . X    .  XX           ",
+".    . X    . .    X X    . X    . X    . .    . X    . .    . X    .  XX           ",
+" ....   XXXXo o....o o....o  XXXXo o....o o....o  XXXXo o....o o....o               "};
diff --git a/debian/changelog b/debian/changelog
index 8a94a76..efdcd7e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+wmbattery (2.00) unstable; urgency=low
+
+  * Added ACPI support, including battery change detection, and battery
+    charging time countdown timer.
+  * Added -w parameter to configure delay time.
+  * Added -c and -l parameters to allow user control of battery low/critical
+    percentages.
+  * Use constant defs from apm.h instead of nasty hardcoded numbers.
+  * Made -Wall clean.
+  * Reorg.
+  * Removed -s option, just fall back to SPIC if ACPI and APM are not
+    available.
+
+ -- Joey Hess <joeyh at debian.org>  Fri,  5 Apr 2002 12:53:18 -0500
+
 wmbattery (1.23) unstable; urgency=low
 
   * Added support for querying for battery status via the sonypi driver, for
diff --git a/debian/control b/debian/control
index ff22d78..80da2a3 100644
--- a/debian/control
+++ b/debian/control
@@ -9,17 +9,15 @@ Package: wmbattery
 Architecture: any
 Depends: ${shlibs:Depends}
 Suggests: wmaker
-Description: Display laptop battery info, dockable in WindowMaker
- Wmbattery displays the status of your laptop's battery in a small icon.
+Description: display laptop battery info, dockable in WindowMaker
+ wmbattery displays the status of your laptop's battery in a small icon.
  This includes if it is plugged in, if the battery is charging, how many
- minutes of battery life remain, battery life remaining (with both a 
- percentage and a graph), and battery status (high - green, low - yellow, 
- or critical - red).
+ minutes of battery life remain, and battery status (high - green, low -
+ yellow, or critical - red).
  .
  There's nothing in the program that makes it require WindowMaker, except
  maybe the look. It can be docked in WindowMaker or AfterStep's dock.
  .
- To use this program you need to enable APM support for your kernel during
- configuration; the corresponding questions are in the 'Character devices'
- section. It will only work on laptops with an APM BIOS and on Sony laptops
- with the sonypi device.
+ wmbattery can use APM, ACPI, or even the SPIC that is in some Sony laptops.
+ With ACPI, it supports multi-battery machines, and can estimate how long
+ it will take the battery to finish charging.
diff --git a/sonypi.h b/sonypi.h
index 59a66e8..03650af 100644
--- a/sonypi.h
+++ b/sonypi.h
@@ -1,3 +1,6 @@
+int sonypi_supported (void);
+int sonypi_read (apm_info *info);
+
 /* There's no good place to get these constants, so I must define them
  * myself. */
 
diff --git a/wmbattery.1x b/wmbattery.1x
index 577d409..0d9de27 100644
--- a/wmbattery.1x
+++ b/wmbattery.1x
@@ -1,21 +1,19 @@
-.TH WMBATTERY 1 "04 April 2002"
+.TH WMBATTERY 1 "05 April 2002"
 .SH NAME
-WMBATTERY \- Dockable APM/Battery Monitor
+wmbattery \- dockable battery monitor
 .SH SYNOPSIS
 .B wmbattery
-[-h] [-d display]
+[options]
 .SH DESCRIPTION
 .PP
 .B wmbattery
 is a battery monitor.  It is used to visually display the system's battery 
 status.
 .PP
-Currently,
 .B wmbattery
-is supported on Linux (where it reads APM information from /proc/apm),
-and Free/Net/OpenBSD (where it reads /dev/apm). It also has special support
-for some Sony laptops that lack APM support, but do have a sonypi driver in
-linux that can report on the battery status.
+can get battery information using APM, ACPI, or the SPIC controller in some
+Sony laptops. You need to build your kernel with support for at least one
+of these for the program to work.
 .B wmbattery
 is dockable using WindowMaker and AfterStep window-managers; under
 other window-managers
@@ -40,6 +38,10 @@ The large dial at the top of the display shows battery life remaining.
 The time display, right under and in the middle of the dial, shows how
 many hours and minutes of battery life is estimated to remain at the
 current rate of use.
+.P
+If ACPI is used and battery is charging, the time display will instead show
+a countdown (starting with a minus sign) of how many hours and minutes it is
+estimated to take until the battery is fully charged.
 .TP
 .B power cord
 The small icon of a power cord plug, in the bottom left, tells if the
@@ -61,16 +63,30 @@ it, it will turn red.
 .B \-h
 Display list of command-line options.
 .TP
-.B \-d [display]
+.B \-w secs
+Pause this many seconds between updates. Defaults to 1 for APM and 3 for
+ACPI (since querying ACPI takes quite a bit more CPU power).
+.TP
+.B \-d display
 Use the designated X display.
 .TP
 .B \-g +x+y
 Specify geometry. This specifies position, not size.
 .TP
-.B \-s
-If APM cannot be initialized, don't give up, but instead use the sonypi driver
-and /dev/sonypi. This is useful on some Sony laptops that lack APM support.
-It is inferior to APM.
+.B \-b battnum
+Display the given battery. Only of use with ACPI on systems with more than
+one battery. The default is to display the first battery found.
+.TP
+.B \-l percent
+Set the percentaqge at which the battery is considered to be running low. By
+default, this percentage is determined by APM or ACPI, and you shouldn't
+need to set it. If you set this, you should probably also set the -c
+switch.
+.TP
+.B \-c percent
+Set the percentaqge at which the battery is considered to be critically low.
+By default, this percentage is determined by APM or ACPI, and you shouldn't
+need to set it. If you set this, you should probably also set the -l
+switch.
 .SH AUTHOR
-Joey Hess <joey at kitenet.net>, based on wmapm by
-Chris D. Faulhaber <jedgar at speck.ml.org>
+Joey Hess <joey at kitenet.net>
diff --git a/wmbattery.c b/wmbattery.c
index 310eabf..c3f070f 100644
--- a/wmbattery.c
+++ b/wmbattery.c
@@ -8,10 +8,6 @@
 #include <stdarg.h>
 #include <signal.h>
 #include <apm.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
 
 #ifdef HAVE_GETOPT_H
 #include <getopt.h>
@@ -20,6 +16,7 @@
 #include "wmbattery.h"
 #include "mask.xbm"
 #include "sonypi.h"
+#include "acpi.h"
 
 Pixmap images[NUM_IMAGES];
 Window root, iconwin, win;
@@ -29,9 +26,13 @@ Display *display;
 GC NormalGC;
 int pos[2] = {0, 0};
 
-int try_sonypi = 0;
+int battnum = 1;
 int use_sonypi = 0;
-signed int spicfd = -1;
+int use_acpi = 1;
+int delay = 0;
+
+signed int low_pct = -1;
+signed int critical_pct = -1;
 
 void error(const char *fmt, ...) {
   	va_list arglist;
@@ -91,13 +92,17 @@ char *parse_commandline(int argc, char *argv[]) {
 	extern char *optarg;
 	
   	while (c != -1) {
-  		c=getopt(argc, argv, "hd:g:f:s");
+  		c=getopt(argc, argv, "hd:g:f:b:w:c:l:");
 		switch (c) {
 		  case 'h':
-			printf("\nUsage: wmbattery [options]\n");
+			printf("Usage: wmbattery [options]\n");
               		printf("\t-d <display>\tselects target display\n");
                		printf("\t-h\t\tdisplay this help\n");
                         printf("\t-g +x+y\t\tposition of the window\n");
+			printf("\t-b num\t\tnumber of battery to display\n");
+			printf("\t-w secs\t\tseconds between updates\n");
+			printf("\t-l percent\t\tlow percentage\n");
+			printf("\t-c percent\t\tcritical percentage\n");
                		exit(0);
 		 	break;
 		  case 'd':
@@ -115,8 +120,17 @@ char *parse_commandline(int argc, char *argv[]) {
                           }
                         }
                         break;
-		  case 's':
-			try_sonypi = 1;
+		  case 'b':
+			battnum = atoi(optarg);
+			break;
+		  case 'w':
+			delay = atoi(optarg);
+			break;
+		  case 'l':
+			low_pct = atoi(optarg);
+			break;
+		  case 'c':
+			critical_pct = atoi(optarg);
 			break;
       		}
     	}
@@ -256,25 +270,25 @@ void recalc_window(apm_info cur_info) {
 	
 	/* Display if it's plugged in. */
       	switch (cur_info.ac_line_status) {
-	  case 1:
+	  case AC_LINE_STATUS_ON:
 		draw_image(PLUGGED);
 		break;
        	  default:
 		draw_image(UNPLUGGED);
-      	}
-    
+	}
+	
       	/* Display the appropriate color battery. */
       	switch (cur_info.battery_status) {
-	  case 0: /* high */
-	  case 3: /* charging */
+	  case BATTERY_STATUS_HIGH:
+	  case BATTERY_STATUS_CHARGING:
 		draw_image(BATTERY_HIGH);
 		break;
-	  case 1:
-		draw_image(BATTERY_MEDIUM);
+	  case BATTERY_STATUS_LOW:
+		draw_image(BATTERY_LOW);
 		break;
-	  case 2: /* critical -- blinking red battery */
+	  case BATTERY_STATUS_CRITICAL: /* blinking red battery */
 		if (blinked)
-			draw_image(BATTERY_LOW);
+			draw_image(BATTERY_CRITICAL);
 		else
 			draw_image(BATTERY_BLINK);
 		blinked=!blinked;
@@ -284,7 +298,7 @@ void recalc_window(apm_info cur_info) {
       	}
 
       	/* Show if the battery is charging. */
-  	if (cur_info.battery_flags & 8) {
+  	if (cur_info.battery_flags & BATTERY_FLAGS_CHARGING) {
 		draw_image(CHARGING);
 	}
   	else {
@@ -311,22 +325,26 @@ void recalc_window(apm_info cur_info) {
 		   image_info[DIAL_DIM].y);
   
       	/* Show time left */
-      	if (cur_info.battery_time >= 0) {
-        	if (cur_info.using_minutes)
-          		time_left = cur_info.battery_time;
-        	else
-          		time_left = cur_info.battery_time / 60; 
-        	hour_left = time_left / 60;
-        	min_left = time_left % 60;
-        	digit = hour_left / 10;
-        	draw_letter(digit,BIGFONT,HOURS_TENS_OFFSET);
-        	digit = hour_left % 10;
-		draw_letter(digit,BIGFONT,HOURS_ONES_OFFSET);
-       		digit = min_left / 10;
-        	draw_letter(digit,BIGFONT,MINUTES_TENS_OFFSET);
-        	digit = min_left % 10;
-        	draw_letter(digit,BIGFONT,MINUTES_ONES_OFFSET);
-      	}
+        if (cur_info.using_minutes)
+        	time_left = cur_info.battery_time;
+        else
+        	time_left = cur_info.battery_time / 60; 
+	if (time_left < 0)
+		time_left = time_left * -1;
+        hour_left = time_left / 60;
+        min_left = time_left % 60;
+        digit = hour_left / 10;
+	if (cur_info.battery_time < 0)
+		/* Sacrifice a diget to display the minus sign. */
+		draw_letter(11, BIGFONT, HOURS_TENS_OFFSET);
+	else
+	        draw_letter(digit,BIGFONT,HOURS_TENS_OFFSET);
+        digit = hour_left % 10;
+	draw_letter(digit,BIGFONT,HOURS_ONES_OFFSET);
+       	digit = min_left / 10;
+        draw_letter(digit,BIGFONT,MINUTES_TENS_OFFSET);
+        digit = min_left % 10;
+        draw_letter(digit,BIGFONT,MINUTES_ONES_OFFSET);
       	
 	/* Show percent remaining */
       	if (cur_info.battery_percentage >= 0) {
@@ -346,11 +364,6 @@ void recalc_window(apm_info cur_info) {
 	  	draw_letter(10,SMALLFONT,PERCENT_OFFSET);
 	  	draw_letter(10,BIGFONT,COLON_OFFSET);
 	}
-	
-	if (cur_info.battery_time < 0) {
-		/* TIme remaining is unknown, so dim the colon. */
-	  	draw_letter(10,BIGFONT,COLON_OFFSET);
-	}
 
 	redraw_window();
 }
@@ -358,7 +371,11 @@ void recalc_window(apm_info cur_info) {
 void alarmhandler(int sig) {
 	apm_info cur_info;
 	
-	if (! use_sonypi) {
+	if (use_acpi) {
+		if (acpi_read(battnum, &cur_info) != 0)
+			error("Cannot read ACPI information.");
+	}
+	else if (! use_sonypi) {
 		if (apm_read(&cur_info) != 0)
 			error("Cannot read APM information.");
 	}
@@ -367,99 +384,57 @@ void alarmhandler(int sig) {
 			error("Cannot read sonypi information.");
 	}
 		
+	/* Override the battery status? */
+	if ((low_pct > -1 || critical_pct > -1) && 
+	    cur_info.ac_line_status != AC_LINE_STATUS_ON) {
+		if (cur_info.battery_percentage <= critical_pct)
+			cur_info.battery_status = BATTERY_STATUS_CRITICAL;
+		else if (cur_info.battery_percentage <= low_pct)
+			cur_info.battery_status = BATTERY_STATUS_LOW;
+		else
+			cur_info.battery_status = BATTERY_STATUS_HIGH;
+	}
+	
 	/* If APM data changes redraw and wait for next update */
 	/* Always redraw if the status is critical, to make it blink. */
-	if (!apm_change(&cur_info) || cur_info.battery_status == 2)
+	if (!apm_change(&cur_info) || cur_info.battery_status == BATTERY_STATUS_CRITICAL)
 		recalc_window(cur_info);
 
-	alarm(DELAY);
-}
-
-inline int sonypi_ioctl(int ioctlno, void *param) {
-	if (ioctl(spicfd, ioctlno, param) < 0)
-		return 0;
-	return 1;
-}
-
-/* Read battery info from sonypi device and shove it into an apm_into
- * struct. */
-int sonypi_read (apm_info *info) {
-	__u8 batflags;
-	__u16 cap, rem;
-	int havebatt = 0;
-	
-	info->using_minutes = info->battery_flags = 0;
-	
-	if (! sonypi_ioctl(SONYPI_IOCGBATFLAGS, &batflags)) {
-		return 1;
-	}
-
-	info->ac_line_status = (batflags & SONYPI_BFLAGS_AC) != 0;
-	if (batflags & SONYPI_BFLAGS_B1) {
-		if (! sonypi_ioctl(SONYPI_IOCGBAT1CAP, &cap))
-			return 1;
-		if (! sonypi_ioctl(SONYPI_IOCGBAT1REM, &rem))
-			return 1;
-		havebatt = 1;
-	}
-	else if (batflags & SONYPI_BFLAGS_B2) {
-		/* Not quite right, if there is a second battery I should
-		 * probably merge the two somehow.. */
-		if (! sonypi_ioctl(SONYPI_IOCGBAT2CAP, &cap))
-			return 1;
-		if (! sonypi_ioctl(SONYPI_IOCGBAT2REM, &rem))
-			return 1;
-		havebatt = 1;
-	}
-	else {
-		info->battery_percentage = 0;
-		info->battery_status = -1; /* no battery */
-	}
-	
-	if (havebatt) {
-		info->battery_percentage = 100 * rem / cap;
-		/* Guess at whether the battery is charging. */
-		if (info->battery_percentage < 99 && info->ac_line_status == 1) {
-			info->battery_flags = info->battery_flags | 8;
-			info->battery_status = 3; /* charging */
-		}
-		else {
-			/* Guess at battery status. */
-			if (info->battery_percentage > 10)
-				info->battery_status = 0; /* full */
-			else if (info->battery_percentage > 5)
-				info->battery_status = 1; /* medium */
-			else 
-				info->battery_status = 2; /* critical */
-		}
-	}
-	
-	/* Sadly, there is no way to estimate this. */
-	info->battery_time = -1;
-	
-	return 0;
+	alarm(delay);
 }
 
 int main(int argc, char *argv[]) {
 	make_window(parse_commandline(argc, argv), argc ,argv);
 
 	/*  Check for APM support (returns 0 on success). */
-	if (apm_exists() != 0) {
-		if (try_sonypi) {
-			/* Try to open the sonypi device. */
-			if ((spicfd = open("/dev/sonypi", O_RDWR)) == -1) {
-				error("Unable to open /dev/sonypi: %s",
-						strerror(errno));
-			}
-			else {
-				use_sonypi = 1;
-			}
-		}
-		else {
-			error("No APM support in kernel.");
+	if (apm_exists() == 0) {
+		if (! delay)
+			delay = 1;
+	}
+	/* Check for ACPI support. */
+	else if (acpi_supported()) {
+		if (battnum > batt_count || battnum < 1) {
+			error("There %s only %i batter%s, and you asked for number %i.",
+					batt_count == 1 ? "is" : "are",
+					batt_count,
+					batt_count == 1 ? "y" : "ies",
+					battnum);
 		}
+		use_acpi = 1;
+		if (! delay)
+			delay = 3; /* sigh */
 	}
-	
+	else if (sonypi_supported()) {
+		use_sonypi = 1;
+		low_pct = 10;
+		critical_pct = 5;
+		if (! delay)
+			delay = 1;
+	}
+	else {
+		error("No APM, ACPI, or SPIC support in kernel.");
+	}
+		
 	load_images();
 	
 	signal(SIGALRM, alarmhandler);
diff --git a/wmbattery.h b/wmbattery.h
index bf59f61..0effedb 100644
--- a/wmbattery.h
+++ b/wmbattery.h
@@ -1,5 +1,3 @@
-#define DELAY 1 /* Delay between refreshes (in seconds) */
-
 typedef struct {
 	Pixmap pixmap;
 	Pixmap mask;
@@ -19,8 +17,8 @@ typedef struct image_info_type {
 #define SMALLFONT 0
 #define BIGFONT 1
 #define BATTERY_HIGH 2
-#define BATTERY_MEDIUM 3
-#define BATTERY_LOW 4
+#define BATTERY_LOW 3
+#define BATTERY_CRITICAL 4
 #define BATTERY_NONE 5
 #define BATTERY_BLINK 6
 #define UNPLUGGED 7

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbattery.git



More information about the Pkg-wmaker-commits mailing list