[Pkg-wmaker-commits] [wmbattery] 128/241: Added -i to display as icon. Thanks, Tovar Closes: #732398

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:37:46 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 7b00ce7fd69ca23fedd8aa0f2debc391a07233ec
Author: Joey Hess <joey at kitenet.net>
Date:   Tue Dec 17 14:45:14 2013 -0400

    Added -i to display as icon. Thanks, Tovar Closes: #732398
---
 Makefile         | 2 ++
 debian/changelog | 6 ++++++
 wmbattery.1x     | 3 +++
 wmbattery.c      | 9 +++++++--
 4 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index e9fcce8..b5262d5 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,8 @@ upower.o: upower.c
 	$(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)
 
diff --git a/debian/changelog b/debian/changelog
index c0f8d70..af7575e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+wmbattery (2.43) UNRELEASED; urgency=low
+
+  * Added -i to display as icon. Thanks, Tovar Closes: #732398
+
+ -- Joey Hess <joeyh at debian.org>  Tue, 17 Dec 2013 14:44:44 -0400
+
 wmbattery (2.42) unstable; urgency=medium
 
   * Stop building with flash-in-the-pan HAL. Instead update acpi
diff --git a/wmbattery.1x b/wmbattery.1x
index 79bcf77..c2bb88c 100644
--- a/wmbattery.1x
+++ b/wmbattery.1x
@@ -103,5 +103,8 @@ estimating time. (Implies -e)
 .B \-a file.au
 Play the specified au file (by sending it to /dev/audio) when the battery
 is low.
+.TP
+.B \-i
+Display as icon.
 .SH AUTHOR
 Joey Hess <joey at kitenet.net>
diff --git a/wmbattery.c b/wmbattery.c
index bdd4b92..91b98b8 100644
--- a/wmbattery.c
+++ b/wmbattery.c
@@ -52,6 +52,7 @@ int use_acpi = 0;
 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 @@ char *parse_commandline(int argc, char *argv[]) {
 	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 @@ char *parse_commandline(int argc, char *argv[]) {
 				}
 			}
 			break;
+		  case 'i':
+			initial_state = IconicState;
+			break;
 		  case 'b':
 			battnum = atoi(optarg);
 			break;
@@ -339,7 +344,7 @@ void make_window(char *display_name, int argc, char *argv[]) {
 	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;

-- 
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