You are not logged in.
Since the LXDE Battery Monitor is buggy and next to useless I wrote a replacement for myself to use. Hopefully someone else can make use of it.
Features:
Simple interface to show battery level.
SysTray Icon to show charge level.
Configurable colors. (~/.config/pybttry/settings)
Planned Features:
Warn user when low battery.
More configuration options.
Known Bugs:
Opening from Application Menu doesn't always show SysTray Icon correctly.
Text Color isn't configurable.
Download:
https://github.com/Peter-W/PyBttry
Installation:
pacman -S wxpython acpi
cd PyBttry
./INSTALL
Depending on how your have Python setup, you might need to edit /usr/bin/pybttry to use "python2" rather than "python".
Last edited by PSW (2011-09-09 12:03:07)
Offline
Could you supply a screenshot please? Also, a PKGBUILD would be better I guess.
Other than that, it sounds interesting and I might replace batti which I currently use!
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
I'm getting an error when I try to run PyBttry:
┌─[jente@lappy pybttry][13:52:43]
└─■ pybttry
File "/usr/share/pybttry/PyBttry.py", line 98
print commands.getoutput("acpi -b")
^
SyntaxError: invalid syntax
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
I'm getting an error when I try to run PyBttry:
┌─[jente@lappy pybttry][13:52:43] └─■ pybttry File "/usr/share/pybttry/PyBttry.py", line 98 print commands.getoutput("acpi -b") ^ SyntaxError: invalid syntax
What version of Python are you running?
Offline
┌─[jente@lappy ~][17:05:01]
└─■ python --version
Python 3.2.2
Is that the correct one? System is fully up to date
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
print output is python 2.x
In python 3.x, print is a function call. e.g. print( output )
A long shot, but try changing the line to:
print (commands.getoutput("acpi -b"))
Last edited by Earnestly (2011-09-12 16:26:20)
Offline
When I do that, it says this:
┌─[jente@lappy ~][18:35:57]
└─■ pybttry
Traceback (most recent call last):
File "/usr/share/pybttry/PyBttry.py", line 1, in <module>
import wx, commands, sys
ImportError: No module named wx
I do have wxpython installed:
┌─[jente@lappy ~][18:35:59]
└─■ pacman -Qs wxpython
local/wxpython 2.8.12.1-1
A wxWidgets GUI toolkit for Python
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
Ah, that'd be because wxWidgets isn't supported in python3 yet (afaik) http://stackoverflow.com/questions/7208 … r-python-3
It is entirely possible to install python 2.7 and change the pybttry bash script to
#!/bin/bash
python2.7 /usr/share/pybttry/PyBttry.py
Last edited by Earnestly (2011-09-12 16:50:41)
Offline
^ I had python2 already installed, dependency of wxpython I guess. Anyway, didn't think of running it like that.
However, it now doesn't open in the tray but in a standalone window...
Last edited by Unia (2011-09-12 16:51:53)
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline