2 of 4 added info

How to enable/disable Do Not Disturb from shell on Mavericks

I would like to toggle the Do Not Disturb in the notification center with a keyboard shortcut.

I am using better touch tool for some extra keyboard shortcuts but it does not support enabling/disabling the notifications in the default options.

It has an option for executing a terminal command so I'm asking here how to enable/disable Do Not Disturb from the terminal?

I found this post and I tried to run the commands but it didn't seem to work.

Edit:

I found out how to change it in the config file:

defaults write ~/Library/Preferences/ByHost/com.apple.notificationcenterui.A7CBDEFD-A69F-57AE-9F7B-496D40E34762.plist doNotDisturb 1

Note that A7CBDEFD-A69F-57AE-9F7B-496D40E34762 is specific to my system.

It toggles the value but it does not show it in the Notification Center. Also,

killall NotificationCenter

will restart the Notification Center with 0, which is off.