-
-
Save LucaTNT/9365e496f8c3f045b4f3 to your computer and use it in GitHub Desktop.
Cleans OS X's Notification Center
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: @giu1io | |
# Thanks @LucaTNT for making the script work on < 10.10 | |
MAJOR_OSX_VERSION=$(sw_vers -productVersion | awk -F '.' '{print $2}') | |
if [[ $MAJOR_OSX_VERSION -ge 10 ]] | |
then | |
DB_PATH=`getconf DARWIN_USER_DIR`com.apple.notificationcenter/db/db | |
else | |
DB_PATH="$HOME/Library/Application Support/NotificationCenter/" | |
DB_PATH=$DB_PATH`ls "$DB_PATH"` | |
fi | |
sqlite3 "$DB_PATH" "DELETE FROM notifications WHERE 1" | |
killall usernoted | |
killall NotificationCenter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment