Play a chime sound effect when MacBook Pro is chargingPlay a chime sound effect when MacBook Pro is charging

When you connect a power source to an iPhone, iPad, iPod touch, or MacBook, a familiar charging chime sound will trigger from the device, indicating that a cable is attached and the device is getting power. If you like hearing that auditory confirmation that a device is getting power, you can add the exact same audio playback feature to any MacBook Pro or MacBook Air by turning to the command line of MacOS and Mac OS X. You’ll even get an onscreen visual cue on the Mac indicating where the battery charge is, which looks straight out of iOS as well.

Enabling the power chime sound effect on a Mac is pretty easy. Because the power indicator is dependent on a battery, this almost certainly requires a MacBook Pro or MacBook Air to function as intended. You won’t need to do this on the MacBook line because it makes the sound by default (though you can turn it off on that machine if you want to, more on that in a minute). This also requires Mac OS X Yosemite (10.10.3 or later) as the PowerChime.app does not appear to exist in prior releases of Mac system software.

Enable Playing a Power Chime Sound Effect on a MacBook Pro & MacBook Air

  1. Disconnect the Mac from the MagSafe power source
  2. Open the Terminal app, found in /Applications/Utilities/
  3. Enter the following command syntax, be sure there are no breaks as you’ll want to fit the entire sequence onto a single line (no it doesn’t matter if it wraps):
  4. defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app &

  5. Hit Return
  6. Re-connect the MacBook power supply to hear the chime

This will enable the feature through the defaults command string and simultaneously launch the PowerChime application, the latter tiny app must be running in order for the power chime sound effect to trigger.

Now you just have to disconnect your MagSafe (or USB-C) power connector from the Mac, wait a second or two, then reconnect it. You’ll hear the familiar power connected / charging sound effect from your iPhone and iPad devices. If you keep an eye on the battery and energy use menu of Mac OS X and you’ll see the sound triggers at the exact same time as the charging bolt appears on the battery menu item.

The charging indicator in Mac menu bar of Mac OS XThe charging indicator in Mac menu bar of Mac OS X

The brief video below walks through entering the syntax into the Terminal app and then disconnecting and re-connecting a MagSafe adapter to trigger the power sound effect. This may be helpful if you’re confused, or you just want to see what it does rather than try it yourself:

Note the battery charging indicator will only display onscreen if there is less than 100% power available with the Mac battery and the Mac is either in sleep mode or the screen is locked. The sound effect will even trigger if the MacBook is sleeping too, though that aspect appears limited to newer hardware with the ability to use PowerNap.

You can also trigger the sound effect manually, maybe you like the way it sounds or you’re just curious what we’re talking about here. Use the following command to play the power chime sound effect:

afplay /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif

Disable the Chime Sound Effect on Power Cable Connect in Mac OS X

You can also turn off the power chime sound effect when you connect a power cable to a Mac by issuing a different defaults command string within the Mac OS X Terminal:

defaults write com.apple.PowerChime ChimeOnAllHardware -bool false;killall PowerChime

This will disable the sound effect when connecting a power cable on the MacBook Air, MacBook Pro, and yes, it will also disable the power chime sound effect on the MacBook line as well.

Many new MacBook owners have noticed this little feature, but the source of the audio was uncovered by @zwaldowski, who reports that some Macs will even have a vibrating trackpad with this feature enabled (a new Retina MacBook Pro does not offer that aspect). Be sure to follow @osxdaily too, and let us know if you decide to keep the power sound effect around on your Mac.

Source

Follow Me:
Top Best Sellers!!