#!/bin/sh

CONFIG_FILE="/home/user/.config/MohammadAG/sociality.conf"

if [ -f $CONFIG_FILE ]; then
	rm -f $CONFIG_FILE
fi

# Update the icon cache
gtk-update-icon-cache -f /usr/share/icons/hicolor

# Add Sociality to the notification bubble settings
NOTIFICATIONS_CONF="/etc/hildon-desktop/notification-groups.conf"
NOTIFICATIONS_KEY="sociality-new-notifications"


if ! grep -q "$NOTIFICATIONS_KEY" "$NOTIFICATIONS_CONF"; then
    echo -n "Updating $NOTIFICATIONS_CONF..."
    cat >>$NOTIFICATIONS_CONF << EOF

### BEGIN Added by sociality postinst ###

[sociality-new-notifications]
Destination=Sociality
Icon=general_facebook
LED-Pattern=PatternCommonNotification

### END Added by sociality postinst ###

EOF
    echo "done."
fi


exit 0
