Battery monitor for Dingo Alpha5
Battery monitor for Dingo Alpha5
I found a small battery monitor that JWM will swallow into the tray. The home page is here:
http://www.tigr.net/afterstep/view.php? ... asapm/data
Compiled it on Dingo alpha5. I modified /root/.jwmrc-tray to swallow the applet and /etc/rc.d/rc.modules2 to detect if we're using a laptop so that we modprobe battery and ac. I've attached a pet package for testing and the source for asapm. I've tested this on a laptop and on a desktop (to make sure nothing happens if we're not using a laptop.)
Note: This pet package will over-write /root/.jwmrc-tray and /etc/rc.d/rc.modules2.
EDIT: Hacked the source to remove the time remaining, which didn't show on the screen. And removed the Battery slider, half of that didn't show. So made it a little smaller too. Reboot after installing.
http://www.tigr.net/afterstep/view.php? ... asapm/data
Compiled it on Dingo alpha5. I modified /root/.jwmrc-tray to swallow the applet and /etc/rc.d/rc.modules2 to detect if we're using a laptop so that we modprobe battery and ac. I've attached a pet package for testing and the source for asapm. I've tested this on a laptop and on a desktop (to make sure nothing happens if we're not using a laptop.)
Note: This pet package will over-write /root/.jwmrc-tray and /etc/rc.d/rc.modules2.
EDIT: Hacked the source to remove the time remaining, which didn't show on the screen. And removed the Battery slider, half of that didn't show. So made it a little smaller too. Reboot after installing.
- Attachments
-
- shot2.png
- Hacked version
- (4.23 KiB) Downloaded 5420 times
-
- Dingo-battery.pet
- Pet package
- (14.63 KiB) Downloaded 2559 times
-
- asapm-3.1.1.tar.gz
- Hacked source. Not needed for testing.
- (62.53 KiB) Downloaded 1761 times
Last edited by kirk on Mon 28 Jan 2008, 14:07, edited 2 times in total.
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
Nice idea.
You should have mentioned that a reboot is necessary after installation.
Unfortunately, the tray height isn't enough to display the complete applet.
I have the little battery and the percentage.
When I double the tray height from 28 to 56, I can see most of the time as well.
Maybe that horizontal battery should only be displayed, when the laptop is AC powered. When reducing the fonts, I think percentage and time can be displayed in a normal height tray then.
You should have mentioned that a reboot is necessary after installation.
Unfortunately, the tray height isn't enough to display the complete applet.
I have the little battery and the percentage.
When I double the tray height from 28 to 56, I can see most of the time as well.
Maybe that horizontal battery should only be displayed, when the laptop is AC powered. When reducing the fonts, I think percentage and time can be displayed in a normal height tray then.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Sorry, yes a reboot is needed.
Béèm, does yours look different that the shot I've attached? It does cut off the bottom of the display, the part that has time remaining. But If I shrank the display enough to see that, it would be too small and hard to read.
Béèm, does yours look different that the shot I've attached? It does cut off the bottom of the display, the part that has time remaining. But If I shrank the display enough to see that, it would be too small and hard to read.
- Attachments
-
- shot1.png
- Old version with half of battery slider showing and time remaining off the bottom of the screen.
- (4.07 KiB) Downloaded 5085 times
Last edited by kirk on Mon 28 Jan 2008, 14:09, edited 1 time in total.
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
Yes kirk, it is the same as you have.
Well the percentage is a good indication already.
I am no programmer and so didn't look at the code.
In case the laptop is on battery, there is no need to have that horizontal battery with the power cord.
If that could be suppressed in that case, maybe there is room enough for both percentage and time.
When the laptop is on AC, it can then stay as it is now.
Just a thought.
Well the percentage is a good indication already.
I am no programmer and so didn't look at the code.
In case the laptop is on battery, there is no need to have that horizontal battery with the power cord.
If that could be suppressed in that case, maybe there is room enough for both percentage and time.
When the laptop is on AC, it can then stay as it is now.
Just a thought.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
thanks kirk, worked great over here.
tested like you did, tried it on laptop and then moved over to desktop.
no problems either way.
I hope this makes it into the final dingo.
Any thoughts on the modules ac, fan, processor, and thermal. Is it possible to autodetect if they are needed and load those modules? I was checking out lm_sensors but was wondering if anyone knew a way to do it without adding anything.
I also checked out this page:
http://gentoo-wiki.com/HARDWARE_Sensors
it mentions that use of lm_sensors on IBM Thinkpads is not recommended. Not sure if that's outdated or not, so maybe it's not a good idea.
Just thowing out some ideas. Love to help this go even a bit further.
tested like you did, tried it on laptop and then moved over to desktop.
no problems either way.
I hope this makes it into the final dingo.
Any thoughts on the modules ac, fan, processor, and thermal. Is it possible to autodetect if they are needed and load those modules? I was checking out lm_sensors but was wondering if anyone knew a way to do it without adding anything.
I also checked out this page:
http://gentoo-wiki.com/HARDWARE_Sensors
it mentions that use of lm_sensors on IBM Thinkpads is not recommended. Not sure if that's outdated or not, so maybe it's not a good idea.
Just thowing out some ideas. Love to help this go even a bit further.
As Béèm had mentioned the time remaining was off the bottom of the screen and the battery slider was half way off the bottom of the screen. So I hacked the source to remove both of them. This also took about 10K off the executable. I edited the original post. If you installed the old package you don't need to remove it, just install the new one.
NathanO,
I don't know. I didn't write this app. Try it out in a new pup_save file.
John Doe,
I haven't looked into that, but I suppose in rc.modules if you detect a battery then you could load any other laptop modules that might be universally needed.
Edit: Just re-read what you wrote, it does load module ac.
NathanO,
I don't know. I didn't write this app. Try it out in a new pup_save file.
John Doe,
I haven't looked into that, but I suppose in rc.modules if you detect a battery then you could load any other laptop modules that might be universally needed.
Edit: Just re-read what you wrote, it does load module ac.
Last edited by kirk on Thu 31 Jan 2008, 19:46, edited 1 time in total.
Kirk,
I am trying to compile this in alpha 4I am interested in compiling asmix to see if it works as a cheaper volume control but getting the same error.
Any clues.
I am trying to compile this in alpha 4
Code: Select all
./configure
loading cache ./config.cache
configure: error: can not find install-sh or install.sh in autoconf ./autoconf
Any clues.
HairyWill,
I haven't tried compiling it in alpha4, but should work. Might want to try a new pup_save file and/or check your md5sums for alpha4 and the devx file. I compiled the mixer app in alpha5, no problems.
I haven't tried compiling it in alpha4, but should work. Might want to try a new pup_save file and/or check your md5sums for alpha4 and the devx file. I compiled the mixer app in alpha5, no problems.
- Attachments
-
- asmixer.gz
- asmixer binary
- (7.86 KiB) Downloaded 1641 times
- MikeLockmoore
- Posts: 43
- Joined: Sun 26 Nov 2006, 18:29
- Location: Near Detroit
It worked for me in 2.14R
As kirk said it over-writes your jwm taskbar and I had to load the kernel modules manually.
Before installing create a backup of /root/.jwmrc-tray, after installation restore the backup tray and edit it to include the following swallow entry
there is a -u or -U argument that can be used to specify the update interval, try
asapm --help after installing
you will need to
before starting it
I'm not sure if the rc.modules2 included will get run on boot in earlier pups so you might need to add those two lines to /etc/rc.d/rc.local
As kirk said it over-writes your jwm taskbar and I had to load the kernel modules manually.
Before installing create a backup of /root/.jwmrc-tray, after installation restore the backup tray and edit it to include the following swallow entry
Code: Select all
<Swallow name="asapm">
asapm
</Swallow>
asapm --help after installing
you will need to
Code: Select all
modprobe battery
modprobe ac
I'm not sure if the rc.modules2 included will get run on boot in earlier pups so you might need to add those two lines to /etc/rc.d/rc.local
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
I installed Kirk's little tool on Dingo. (alpha 5)MikeLockmoore wrote:Any idea whether this will will work on pre-Dingo Puppy releases? I still use 2.17 quite a bit on my laptop and don't have a monitor working on it right now. I realize there could be library or module dependencies that might throw things off.
--
Mike Lockmoore
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
NathanO
asapm uses a config file ~/.asapmrc
this says it can be used to fire commands on AC on/off and on the battery reaching upper and lower thresholds.
I got the AC on/off to play a sound but the thresholds bit didn't work for me, this might be because my battery is so knackered it didn't stay on the threshold for long enough.
Kirk,
I tried extracting the source tar again and got what I needed, thanks for your help I don't know what went wrong. I'm now playing with asmix.
asapm uses a config file ~/.asapmrc
this says it can be used to fire commands on AC on/off and on the battery reaching upper and lower thresholds.
I got the AC on/off to play a sound but the thresholds bit didn't work for me, this might be because my battery is so knackered it didn't stay on the threshold for long enough.
Kirk,
I tried extracting the source tar again and got what I needed, thanks for your help I don't know what went wrong. I'm now playing with asmix.
Silly question.
On my tower I have an APC Back-UPS XS 1500. It has a USB connection that Win see's. Is there a program to monitor UPS's that will work for Puppy?
Rather then having to have two different programs, could this one have an option to do so? I am willing to be the tester, but 3.01 compatability would be a help as that is what I will stay with until 4.0x is fully released.
On my tower I have an APC Back-UPS XS 1500. It has a USB connection that Win see's. Is there a program to monitor UPS's that will work for Puppy?
Rather then having to have two different programs, could this one have an option to do so? I am willing to be the tester, but 3.01 compatability would be a help as that is what I will stay with until 4.0x is fully released.
-
- Posts: 195
- Joined: Sat 21 Jan 2006, 05:35
- Location: Bedfordshire, UK
It's probably my inability to read instructions, but trying Dingo Alpha 6, which has this built in, I get a sort of dark grey on grey, as the attached.
Do I need to run anything, or check any settings, or find out if my laptop contains any particular power management?
Laptop is an NEC i-select:
Processor Intel(R) Celeron(R) M processor 1.50GHz
Memory 765MB (181MB used)
Frugal install on NTFS disk, booting via GRUB.
Do I need to run anything, or check any settings, or find out if my laptop contains any particular power management?
Laptop is an NEC i-select:
Processor Intel(R) Celeron(R) M processor 1.50GHz
Memory 765MB (181MB used)
Frugal install on NTFS disk, booting via GRUB.
- Attachments
-
- battmon.jpg
- (2.62 KiB) Downloaded 2044 times
Rickrandom,
I don't know if I can help, I didn't write this app, just hacked it down a bit. If you have some time, open a console and type:
# asapm
Another battery monitor should open on your desktop. Copy and paste the terminal output here. (after highlighting something in the rxvt terminal window shift-delete copies to the clip board)
Also, your laptop does actually have the battery installed?
I don't know if I can help, I didn't write this app, just hacked it down a bit. If you have some time, open a console and type:
# asapm
Another battery monitor should open on your desktop. Copy and paste the terminal output here. (after highlighting something in the rxvt terminal window shift-delete copies to the clip board)
Also, your laptop does actually have the battery installed?