When you plug your charger into your iPhone or iPad you get a little chime (or two short vibrations if it’s in silent mode) to let you know its connected.

You can activate that same chime on your MacBook when you connect your charger with one simple step.

Simply copy and pasting the following line of code into Terminal:

defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app

You may or may not need to let your MacBook run down from 100% charge for it to work the first time but it worked straight away for me running OSX El Capitan Beta 7 and it has been tested on Yosemite too.

To switch it off, just run this line:

defaults write com.apple.PowerChime ChimeOnAllHardware -bool false; open /System/Library/CoreServices/PowerChime.app

(But why would you want to do that?!)