With the help of a Terminal command you can also have the same sound on your MacBook Pro or MacBook Air as well. It’s another method to know for sure that your charging cable has indeed connected to your laptop, and it’s charging properly.
You’ll need to have the latest version of OS X Yosemite installed on your MacBook Pro / MacBook Air for this. To get the chime, follow the technique detailed below.
1. Open Terminal on your Mac, either by using Spotlight or by accessing it from “Applications -> Utilities.”
2. In Terminal, simply copy and paste the following line, and press Enter on your keyboard.
defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app &
Now whenever you connect your power cord to your Mac, you’ll hear the chime sound indicating that your Mac is charging.
If you ever want to disable it in the future, use the following command:
defaults write com.apple.PowerChime ChimeOnAllHardware -bool false; killall PowerChime