Package: wmbattery
Version: 2.42
Severity: wishlist
Tags: patch

It does not do this easily in a way that i understand under 'fvwm'.
Included is a patch which allows this from the command line.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.51-rt72 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages wmbattery depends on:
ii  libapm1          3.2.2-14
ii  libc6            2.17-97
ii  libglib2.0-0     2.36.4-1
ii  libupower-glib1  0.9.23-2+b1
ii  libx11-6         2:1.6.2-1
ii  libxext6         2:1.3.2-1
ii  libxpm4          1:3.5.10-1
ii  upower           0.9.23-2+b1

wmbattery recommends no packages.

Versions of packages wmbattery suggests:
pn  wmaker  <none>

-- no debconf information
-*- mode: compilation; default-directory: "/usr/src/wmbattery/" -*-
Compilation started at Tue Dec 17 07:47:39

find . -name "*orig" -exec difforig {} -u \;
--- ./wmbattery.c.orig	2013-12-05 11:27:52.000000000 -0800
+++ ./wmbattery.c	2013-12-17 07:45:22.000000000 -0800
@@ -52,6 +52,7 @@
 int delay = 0;
 int always_estimate_remaining = 0;
 int granularity_estimate_remaining = 1;
+int initial_state = WithdrawnState;
 
 signed int low_pct = -1;
 signed int critical_pct = -1;
@@ -214,13 +215,14 @@
 	extern char *optarg;
 	
   	while (c != -1) {
-  		c=getopt(argc, argv, "hd:g:f:b:w:c:l:es:a:");
+  		c=getopt(argc, argv, "hd:g:if:b:w:c:l:es:a:");
 		switch (c) {
 		  case 'h':
 			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-i start \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\tlow percentage\n");
@@ -245,6 +247,9 @@
 				}
 			}
 			break;
+		  case 'i':
+			initial_state = IconicState;
+			break;
 		  case 'b':
 			battnum = atoi(optarg);
 			break;
@@ -339,7 +344,7 @@
 	XShapeCombineMask(display, iconwin, ShapeBounding, 0, 0,
 			  pixmask, ShapeSet);
 	
-	wmhints.initial_state = WithdrawnState;
+	wmhints.initial_state = initial_state;
 	wmhints.icon_window = iconwin;
 	wmhints.icon_x = sizehints.x;
 	wmhints.icon_y = sizehints.y;
--- ./Makefile.orig	2013-12-05 11:27:52.000000000 -0800
+++ ./Makefile	2013-12-17 07:34:37.000000000 -0800
@@ -35,6 +35,8 @@
 	$(CC) $(CPPFLAGS) $(CFLAGS) $(shell pkg-config --cflags upower-glib) -c upower.c -o upower.o
 endif
 
+LIBS+=-lapm -lXext -lXpm
+
 wmbattery: $(OBJS)
 	$(CC) -o wmbattery $(LDFLAGS) $(OBJS) $(LIBS)
 

Compilation finished at Tue Dec 17 07:47:40

Reply via email to