MacBookでも充電ケーブルを繋いだ時にiOSと同じようなチャイムを鳴らせる方法
iPhoneを充電ケーブルに繋いだ時に「フォン」というような音が鳴りますが、MacBook Air もしくは Proを充電ケーブルに繋いだ時にそれと同じ音を鳴らせる方法がOS X Dailyに掲載されていたのでご紹介。
Yosemite以降から搭載されている「PowerChime.app」というアプリが必要です。
ターミナルを開いて以下のコマンドを実行。
defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app &
以後充電を開始するとチャイムが鳴ります。
チャイムの音は以下のコマンドを実行すると確認できます。
afplay /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif
設
定を元に戻すには以下のコマンドを実行します。
defaults write com.apple.PowerChime ChimeOnAllHardware -bool false;killall PowerChime