Package Details: batterymon-clone 1.4.2-1

Git Clone URL: (read-only)
Package Base: batterymon-clone
Description: A simple battery monitor tray icon using acpi
Upstream URL:
Licenses: GPL
Conflicts: batterymon
Provides: batterymon
Submitter: None
Maintainer: grimsock
Last Packager: grimsock
Votes: 123
Popularity: 0.816356
First Submitted: 2011-10-06 16:46
Last Updated: 2016-04-04 12:16

Latest Comments

grimsock commented on 2016-04-04 12:24

@rndstr I fixed that and pkg version issue. The best would be uninstalling and installing package once again, because the proper version is 1.4.2 - not 1.4.3. Let me know if you have any problems with it.

rndstr commented on 2016-03-15 08:02

I'm getting this error

fatal: No annotated tags can describe 'e867a3a0432fb76b5bbc3e659a8da139217c500b'.
However, there were unannotated tags: try --tags.
==> ERROR: pkgver is not allowed to be empty.
==> ERROR: pkgver() generated an invalid version:
==> ERROR: Makepkg was unable to build batterymon-clone.

You need to either annotate your tags or append --tags

grimsock commented on 2015-05-26 08:08

Sure, sorry for delay. New version uploaded.

leepesjee commented on 2014-06-27 20:28

You might want to add notification-daemon as optdepend. On my lxde desktop it doesn't work properly without it.

ndowens commented on 2014-04-16 22:05

I have created a systemd unit file:

Description=Battery Monitor



ndowens commented on 2014-04-15 23:11

Description=Battery Monitor



ndowens commented on 2014-04-15 23:10

I created a simple systemd service file if anyone is interested:

Description=Battery Monitor



ChrisOelmueller commented on 2014-02-05 07:22

Might want to fix the optdepends to use 'python2-notify', and the PKGBUILD in general would probably benefit from new VCS syntax:

HeptaSean commented on 2013-04-15 20:07

Thanks for the *really* fast update!

J-Wreck commented on 2013-04-15 19:00

I added an issue tracker on GitHub, you can report issues there. (and/or just send a pull request).

I also fixed the useless warning.

HeptaSean commented on 2013-04-15 18:45

If started from a terminal the script spams stderr with "No AC adapter property modified handler, ignoring status update" warnings due to this obviously erroneous code:

if self._ac_old_state != state_adapter:
logger.warn("No AC adapter property modified handler, ignoring status update")

Removing the else part fixes that.

Upstream does not seem to have a bugtracker. Where should I/we put that?

paulbarker commented on 2013-04-14 13:31

I'm getting a checksum error on, perhaps you should move to using git within the PKGBUILD and have it download HEAD or a specific commit.

J-Wreck commented on 2013-02-26 16:52

batterymon-clone isn't a panel plugin, its a program that sits in the system tray. Run /usr/bin/batterymon (or just batterymon, it is almost definitely in your $PATH), and it should show up.

Anonymous comment on 2013-02-26 14:11

I installed it but I only see the normal battery monitor in the panel plugins list, batterymon-clone doesn't show up.

J-Wreck commented on 2013-02-02 20:31

That bug has been around for a while, sometimes /sys/class/power_supply/BAT0/energy_now and /sys/class/power_supply/BAT0/power_now incorrectly contains 0. That part is a bug outside my control.

I did update batterymon to give a warning message instead of crashing when this happens, though, thanks.

erikw commented on 2013-01-30 17:19

I get division by zero when I run it (used to work but I just updated to latest version, 1.4.0-3)

Mex commented on 2012-11-15 21:23

Always reports battery level unknown.

J-Wreck commented on 2012-11-08 18:28

If you are using fluxbux, you don't have a notification server running by default. Look at the link I posted, you should install and run one of the notification servers listed there if you actually want to get notifications.

This package can't depend on any of those (since they don't provide anything in common, afaik).

gehidore commented on 2012-11-08 18:25

Sorry must have pasted over my previous in that comment, dbus is running, I use fluxbox.

J-Wreck commented on 2012-11-08 18:12

There wouldn't be anything in /usr/lib/systemd. Look at, you need a notification server running (this is what will actually display notifications). What desktop enviroment are you running?

gehidore commented on 2012-11-08 17:33

Looking under /usr/lib/systemd/ I do see there is no 'dbus-org.freedesktop.Notifications'

gehidore commented on 2012-11-08 17:09

[gehidore@thinkpad ~]$ pgrep dbus

(1/1) installing python2-notify [############################] 100%
[gehidore@thinkpad ~]$ batterymon
Traceback (most recent call last):
File "/usr/bin/batterymon", line 577, in <module>

That's what I get again after checking for dbus, since I wasn't certain at the time of comment that it was running.

J-Wreck commented on 2012-11-08 16:42

@gehidore, it builds and runs fine for me with python2-notify. Is DBus running?

gehidore commented on 2012-11-04 23:46

Arch x86_64.

Blows up if python2-notify is installed.

[gehidore@thinkpad batterymon-clone]$ batterymon
Traceback (most recent call last):
File "/usr/bin/batterymon", line 577, in <module>
File "/usr/bin/batterymon", line 571, in main
File "/usr/bin/batterymon", line 492, in update
File "/usr/bin/batterymon", line 131, in update
File "/usr/bin/batterymon", line 484, in __ac_property_modified_handler
File "/usr/bin/batterymon", line 516, in ac_property_modified
self.n.notify(_("On Battery"), _("AC adapter unplugged, running on battery"),"full")
File "/usr/bin/batterymon", line 453, in notify
glib.GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files

harveythedog commented on 2012-08-08 03:29

Installed on my old ASUS EeePC 900, but it only seems to show "Battery Level: 0%" (with the accompanying empty battery icon)in the tray.

It detects the Battery/AC/Charging/Discharging etc. Notifications work too.

Running --debug it always shows "charge_level: 0" if that might mean anything....

Anonymous comment on 2012-06-19 06:31

Thanks, but you also need to update the md5sum in PKGBUILD.

J-Wreck commented on 2012-06-19 05:18

Patch applied, and dependency fixed.

Anonymous comment on 2012-06-18 11:17

Notification wasn't working properly for me. The issue is indentation and the below patch fixes it. Feel free to upstream this.
D'uh - whitespace doesn't work so well with the comments here... so, the line "pynotify = None" needs to have more whitespace to align with the print() above it.

@@ -24,7 +24,7 @@
import pynotify
if not pynotify.init("Battery Monitor"):
print(_("There was an error initializing the notification system. Notifications won't work."))
- pynotify = None
+ pynotify = None
print(_("You do not seem to have python-notify installed. Notifications won't work."))
pynotify = None

temoto commented on 2012-06-07 14:55

Please, fix depends. You are referencing python3 distutils-extra.

-depends=('python2' 'pygtk' 'python-distutils-extra')
+depends=('python2' 'pygtk' 'python2-distutils-extra')

temoto commented on 2012-06-07 14:54

@@ -7,7 +7,7 @@ arch=('any')
-depends=('python2' 'pygtk' 'python-distutils-extra')
+depends=('python2' 'pygtk' 'python2-distutils-extra')

J-Wreck commented on 2012-06-01 05:00

It builds fine for me with just those packages. What error do you get?

Anonymous comment on 2012-06-01 03:41

It seems like python2-distutils-extra should also be a dependency. I was unable to build with the three packages above installed. Then, after installing python2-distutils-extra, I was able to build.

J-Wreck commented on 2012-03-02 16:56

Ok, this should now work (merged packages with batterymon-clone, a fork that gets power information from /sys not /proc)

J-Wreck commented on 2012-03-02 06:33

No, I was playing around with my server at the tmie and had it redirecting all http traffic through https.

Anyway, since HAL support is dropped and arch kernels are no longer built with CONFIG_ACPI_PROCFS_POWER, this package is broken and will most likely remain broken. I'd suggest moving to batti or batterymon-clone (which is broken as of now, but I will most likely be taking over and updating in the very near future)

Anonymous comment on 2012-03-02 05:21

Self-signed SSL certificate error in downloading the remaining_time.patch file
Does this file really need to be wrapped in SSL?

Mex commented on 2012-03-01 12:08

Module needs updating to use /sys instead of /proc

File "/usr/bin/batterymon", line 589, in <module>
File "/usr/bin/batterymon", line 578, in main
pm = PowerManager()
File "/usr/bin/batterymon", line 486, in __init__
self.adapters = AcAdapterDetector().get_all()
File "/usr/bin/batterymon", line 75, in get_all
for name in os.listdir(basepath):
OSError: [Errno 2] No such file or directory: '/proc/acpi/ac_adapter'

Anonymous comment on 2012-02-24 00:55

Now that I've gotten past my Hal setup problems, I'm running into the same error as harveythedog (ASUS A52F, in case that matters)

harveythedog commented on 2012-02-22 03:31

Batterymon seems to have been broken by something lately here?

Traceback (most recent call last):
File "/usr/bin/batterymon", line 522, in <module>
pm = PowerManager()
File "/usr/bin/batterymon", line 427, in __init__
self.adapter = AcAdapter()
File "/usr/bin/batterymon", line 52, in __init__
raise Exception("No AC adapter found")
Exception: No AC adapter found

Anonymous comment on 2012-02-15 20:50

Still obtained an error:
ERROR: Failure while downloading remaining_time.patch

I was able to manually download it by following the url from the PKGBUILD file, and it installed fine once I had retrieved it.

J-Wreck commented on 2012-02-14 21:27

It was available in the Tarball above, but didn't have a full URL in the PKGBUILD. Fixed in 1.2.0-9

Anonymous comment on 2012-02-14 21:13

I receive the following error from makepkg:
remaining_time.patch was not found in the build directory and is not a URL.

I'm assuming this is the patch added by J-Wreck back in Oct. Does it need to be downloaded separately? and if so, where from, and where does it go?

J-Wreck commented on 2012-01-30 15:45

It definitely exists:

Anonymous comment on 2012-01-30 11:15

"Dependency `hal-info' of `batterymon' does not exist."

MFserver commented on 2011-10-29 13:41

It seems like this batterymon is not updated with the latest changes in acpi; I get an error "/proc/acpi/ac_adapter" does not exist.

J-Wreck commented on 2011-10-19 22:03

Added a patch w/ explodymatt's changes a sed line to user python2 instead of python

Anonymous comment on 2011-03-30 05:15

Found this was producing an error on an eeepc100h when plugged into AC:
2011-03-30 15:12:47,280 - batterymon - ERROR - org.freedesktop.Hal.NoSuchProperty: No property battery.remaining_time on device with id /org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0
I'm not really a programmer, but I located the offending section of code and made a quick hack to stop it happening.

I changed this:

remaining_time = self.__battery.GetProperty('battery.remaining_time')
logger.debug("battery.remaining_time: %s" % str(remaining_time))

except dbus.DBusException, e:
remaining_time = -1

remaining_time = self.__str_time(remaining_time)
to this:

if self.__battery.GetProperty('battery.rechargeable.is_discharging'):
remaining_time = self.__battery.GetProperty('battery.remaining_time')
logger.debug("battery.remaining_time: %s" % str(remaining_time))

except dbus.DBusException, e:
remaining_time = -1

remaining_time = self.__str_time(remaining_time)

ezzetabi commented on 2010-11-01 20:59

which can be done adding

sed -i "$pkgdir/usr/share/batterymon/" -e '1d' -e '2i#!/usr/bin/env python2.7'

somewhere after the cp -a line. (Add sed as buildtime dep for completeness sake)

Saint commented on 2010-10-20 01:56

Or you can only change the first line of the script
#/usr/bin/env python




rata commented on 2010-10-05 18:52

For batterymon to work with the new Python packages in testing, use this PKGBUILD:

Hope it helps =)