Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Monitor connection of laptop power supply Laptop Macs
I really like the MacBook magnetic Power connector, but sometimes I do not notice when it disconnects. This tip helps make disconnects and connects noticeable when a charging change occurs. This tip requires that you install Proxi, which is a free app from Griffin Technology; download it from this page.

Once installed, here's how to create an alert to monitor your power connector:
  1. Launch Proxi and open an Editor window (if it is not already open).
  2. At the bottom of the Triggers column, click on the Gear menu » Insert Trigger, and select Battery Monitor. This will add a Battery Monitor line to the Triggers column; select it.
  3. In the Settings column, where it says Trigger If, select Power Source and Changes to Battery.
  4. In the Tasks column, click on the Gear at the bottom and select Play Sound. In the Settings column, select Submarine (or other sound of your choice).
Repeat these steps to add a second battery monitor to run when the battery starts charging again. I like the Frog Chirp sound for the connect. Finally, add Proxi to your Startup Items so it will run every time you reboot your computer.

[robg adds: A couple of other options for monitoring the power supply connection are Unplugged, and (my personal choice) Growl plus the HardwareGrowler, which can monitor a lot of other hardware-related changes as well. I'm sure there are more out there...]
    •    
  • Currently 2.00 / 5
  You rated: 5 / 5 (16 votes cast)
 
[7,895 views]  

Monitor connection of laptop power supply | 10 comments | Create New Account
Click here to return to the 'Monitor connection of laptop power supply' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Monitor connection of laptop power supply
Authored by: asmeurer on Dec 16, '09 09:15:41AM

Good idea. I usually notice when the power supply pops out because the screen dims, but I am still going to set one of these up because it could happen when I am not looking at my computer. There doesn't seem to be a way to make the notification automatically go away if you plug it back in though.



[ Reply to This | # ]
another way
Authored by: SOX on Dec 16, '09 09:55:45AM
run this perl script and ever 4 minutes it will test to see if you changed from AC to battery power. if so it will speak "AC shutdown!" one time. After the power is restored the trigger to speak is reset. it runs until you stop it. to make a quick and dirty daemon out of this put this in an automator script and then have it launch at login.

#!/usr/bin/perl -w
while (1) {
$r=`pmset -g batt`;
if ( $r =~ m/AC/) {
   system("touch", "/tmp/powerwatchAC"); }
else {
	if (-f "/tmp/powerwatchAC") { 
    system ("say", "AC shutdown!");
    system("rm","/tmp/powerwatchAC");}
   }
 sleep 240;
}


[ Reply to This | # ]
another way
Authored by: SOX on Dec 16, '09 09:59:50AM
better script.

$s =0;
while (1) {
$r=`pmset -g batt`;
if ( $r =~ m/AC/) {
   $s = 1;}
else {
	if ($s) {
    system ("say", "AC shutdown!");
    $s =0;
   }}
 sleep 240;

}


[ Reply to This | # ]
Monitor connection of laptop power supply
Authored by: solefald on Dec 16, '09 09:57:25AM

or just use Unplugged. its free and does just that.

http://briksoftware.com/products/unplugged/



[ Reply to This | # ]
Monitor connection of laptop power supply
Authored by: operator207 on Dec 16, '09 10:41:39AM

Another option, if you use Growl, is to, well, use Growl. Though I notice my plug coming undone easier by setting the screen brightness to one "click" below the plugged in brightness.



[ Reply to This | # ]
Monitor connection of laptop power supply
Authored by: JHromadka on Dec 16, '09 11:45:53AM

Or you could, you know, look at the battery meter in the Menu Bar.

---
James Hromadka



[ Reply to This | # ]
Monitor connection of laptop power supply
Authored by: robg on Dec 16, '09 12:00:08PM

Looking up there is an action you need to take -- something you're not likely to do if your plug is removed by, say, an overly-active two-year-old without your noticing.

These solutions all present a visible reminder on the screen, thereby forcing you to notice the change.

-rob.



[ Reply to This | # ]
Monitor connection of laptop power supply
Authored by: BobHarris on Dec 16, '09 06:00:56PM

Another vote for UnPlugged.

UnPlugged can use its own alert or it can take advantage of Growl. I have my UnPlugged Growl combo configured to use Green timing out popup when the plug in attached, and orange sticky when the plug is removed.

UnPlugged works on Snow Leopard, but configuring it currently requires switching System Preferences into 32 bit (but only while configuring).

The author is working on a version that avoids this hassle on Snow Leopard.



[ Reply to This | # ]
Monitor connection of laptop power supply
Authored by: Jonsi on Dec 17, '09 12:27:09PM

My vote goes to SlimBatteryMonitor, a donationware by Colin Henein. It can be configured in many ways, e.g to only show itself while the laptop runs on batteries and/or charging.



[ Reply to This | # ]
Monitor connection of laptop power supply
Authored by: diamondsw on Apr 06, '10 10:18:33AM

Does anyone know of a tool that will not only monitor the power connection, but actually do something when it changes? I would love to be able to run a shell script (and thus notify growl, write a log entry, poke at some PCI registers, etc), but so far all of the solutions just put yet another visible alert on my screen, which really does nothing for me. As others have mentioned, I can see that it changed via the battery icon, screen dimming, etc - I don't need another alert.

(Actually, that's one of my big beefs with Growl. Great, an elegant framework for showing notifications - and you can't set it up to do anything in response to them. So... great, more stuff I have to manually process.)



[ Reply to This | # ]