Your message dated Wed, 20 Feb 2013 09:32:35 +0000
with message-id <[email protected]>
and subject line Bug#694751: fixed in fdpowermon 1.8
has caused the Debian Bug report #694751,
regarding fdpowermon: Please add option to run command on battery threshold
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
694751: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=694751
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: fdpowermon
Version: 1.6
Severity: wishlist
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Since fdpowermon is already tracking battery percentage, I thought it
would be nice to have a configuration option to run a command when
the level is <= a specified level.

Find attached a quick patch that implements running a command at a certain
threshold.

I've added
action = 80:sudo pm-suspend
to the config for testing, and it works :)


Cheers,
gregor

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJQt8mjAAoJELs6aAGGSaoGeOEQALaekuWN+egAA5pKWvWjs4mh
Rpu4vEGlPoozgLkUAn63+oI+7As2/CAFGpXhMsI8Gia7VVW4GvHVrjeNEtACp1m/
relf/SydQr3hq+Nm16Ps3NhtC7LIcXmgTjKG3MoKJnRsLouucLZGDKxIzARCVaS2
jXyW7tL/Y763m9A/NpZl58qQVXeVB3WKza1MCvnCdfp99ZZeMsQVROMY3Lz8FxpQ
6OrLpeVFrt0SBXqWpbPJfN7n1q6hwAEicyfJw5u3hRmhQIcwphLPD9dHor8Vh//p
8cPZYPFNs2ICfAwCy098xnK5zc2DE/uuDyxQkhd0qGKyPXIl4ZxTZKCV8NIA/Stk
5v9E0Gdh2ikGA2SmxKWBL+p9jt+s/ZNIMpscuoE3C+aASl3V+1gOKT37ogO75hjM
rGP9G1DHkkeCIg0FBmdm2PULWyL4WnnUewdhzQrdiN9Hplp6PCUyJ00p2Evpk9cD
gglXtDW7hM0m9dERzMqsl5avoyZHu6c5D73Wif1EqTM/YkR9jwWFleD04vJzf4Fu
8D9JWOEF24gWZhQoHAoplgFDrCJDDgAlODEVXeHpy4iBXNyYA1qEMmhAxQDe6m21
W3GuZCD6I/3H1/uypn46QMq3e5w0aMt+crXjpiy69G3gXi0bfNjel/VJrDuRA34B
r+mAAfgIg4VlZA0xVdYI
=y4aM
-----END PGP SIGNATURE-----
--- /usr/bin/fdpowermon	2012-10-01 18:51:49.000000000 +0200
+++ fdpowermon	2012-11-29 21:37:26.979424371 +0100
@@ -90,6 +90,11 @@
 			$lastwarning=$flevel;
 		}
 	}
+	if(!$charging && 
+		defined($theme->{action_threshold}) && defined($theme->{action_command}) &&
+		$flevel <= $theme->{action_threshold}) {
+		system($theme->{action_command});
+	}
 	return 1;
 }
 
@@ -140,6 +145,8 @@
 			$curtheme->{charging} = parse_step($1, $curtheme->{steps});
 		} elsif($line=~ /dir\s*=\s*(.*)$/) {
 			$curtheme->{dir} = $1;
+		} elsif($line=~ /action\s*=\s*(.*)$/) {
+			($curtheme->{action_threshold},$curtheme->{action_command}) = split(/:/, $1);
 		}
 	}
 	$theme = $curtheme;

--- End Message ---
--- Begin Message ---
Source: fdpowermon
Source-Version: 1.8

We believe that the bug you reported is fixed in the latest version of
fdpowermon, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Wouter Verhelst <[email protected]> (supplier of updated fdpowermon package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 20 Feb 2013 10:19:48 +0100
Source: fdpowermon
Binary: fdpowermon fdpowermon-icons
Architecture: source all
Version: 1.8
Distribution: unstable
Urgency: low
Maintainer: Wouter Verhelst <[email protected]>
Changed-By: Wouter Verhelst <[email protected]>
Description: 
 fdpowermon - simple battery power monitor for laptops with ACPI
 fdpowermon-icons - icons for fdpowermon
Closes: 694751
Changes: 
 fdpowermon (1.8) unstable; urgency=low
 .
   * Support per-user themes and scripted themes, with an explicit API in
     a separate namespace. The scripted theme allows to register coderefs
     that should be called when we reach a particular battery level,
     either when charging or when discharging. Closes: #694751.
   * Add a manpage, which describes the file format for theming.
Checksums-Sha1: 
 7ee719571838205895ce1d7ab6cba9b532239b2f 1561 fdpowermon_1.8.dsc
 05fbcc36d87987a4429d4707567e5ebf66f0a462 21666 fdpowermon_1.8.tar.gz
 6257b2a274df8074989524f7d2119685f618ed13 12656 fdpowermon_1.8_all.deb
 5d527d1d6635d290db3ba812786c0872753ebce3 14586 fdpowermon-icons_1.8_all.deb
Checksums-Sha256: 
 6245fc915d340e4d00200cbb8a155af5e3433704fceb7a68ae3df71b09e227ac 1561 
fdpowermon_1.8.dsc
 d20dc2f2b2f30376cd4d6a952987ac020e65c574087b34bc7061d4962c9dac3e 21666 
fdpowermon_1.8.tar.gz
 accd914fa7948c740d59e509a1b01eaebba3866cf3826311b9d013b3e4dc996e 12656 
fdpowermon_1.8_all.deb
 ac35cb6a8965ab0e257fc99a136495bc03220d57263ea84eeb71916683649e51 14586 
fdpowermon-icons_1.8_all.deb
Files: 
 a7fe71933d052d4b5abbe6abb0b565d3 1561 x11 extra fdpowermon_1.8.dsc
 2e8743731ff314ce0cce9573041e9200 21666 x11 extra fdpowermon_1.8.tar.gz
 c5e88e0974cb6c03dee4739e23580118 12656 x11 extra fdpowermon_1.8_all.deb
 03dfdf81ec76cf4b2fec117302207e84 14586 x11 extra fdpowermon-icons_1.8_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJRJJWUAAoJEMKUD5Ub3wqdhfYQAJp1EXnZ9gqQUM5uKY6PieJT
w3wcPV1Mhz5PcrsQlDyOsgTSq2YNho9ZmIoLlYtJVthL1f9FyQhIBlMsocXmvf2L
l+vDQDfyUvHZBSFBgbPTJ/i7nmob4ireVWHnQ7pYGIilmw0O3QurYb45ShvBpHle
6g4pTssvRlHOFeBF7n72Y9Syz8LMiAqhw/waCD82ZS7fVW25qS7m3+SmDD2t0ocJ
KIy5PfoQ9pLBOUuO57NoBaKbl0gscHzyaTsVTv5+ziolFtAalpWGk+vaTYryaGAB
V04xcrTxwQKHayRAkFkUuOUGPJyA4h1NGhG/HrH6iHpc9qJtNN9POmquOBtLMpW8
+HSIJ+UBzi/6EVKO11vhwjTM8vJJbqDCFrRI+Bf/L/GCyqTh46WgBupgaf7eTri4
Zg8tRNTsd9qq+Ff90WWE6+qum29KX3w5hxhV8J0GqQYSapfnxnogEyrUcAIFLWbY
XqwHkK/Tm8iVaFAChbhBoriOQjs5VhIIhTDzyMtYzfnhfIRvlOcJP+fUoWFmddLz
SDXC20qFLdH6OmIYyw7BgMOg/dz0VhV4ZXJXz8qsywLkam33VQaMw2EqYwL2Ofuf
tSuw793Ftitq7lN474lqUG3Qmfr5JdLZC+LwnI/bVtBjjbWpmfMkLL5+cFK+V5tb
zsL+pIVN8MEj9vKvwdZ8
=kg4h
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to