As the upload tool of launchpad doesn't work right now, here is my lazy lock down script:
#!/bin/sh
### Config
NOTIFY=on #(on/off)
LOCK_TITLE="Panel Lock Down"
LOCK_MSG="Locking the GNOME panel"
UNLOCK_TITLE="Panel Lock Down"
UNLOCK_MSG="Unlocking the GNOME panel"
LOCK_ICON="/usr/share/icons/hicolor/48x48/apps/gdu-encrypted-lock.png"
UNLOCK_ICON="/usr/share/icons/hicolor/48x48/apps/gdu-encrypted-unlock.png"
### Dependency checking
if [ -z "$(which gconftool-2)" ]; then
if [ -n "$(which gconftool-2)" ]; then
zenity --warning --text "Error. No binary found for gconftool-2!" --title "Panel Lock Down"
else
echo "Panel Lock Down: Error. No binary found for gconftool-2!"
fi
exit 1
fi
if [ "$NOTIFY" = "on" ] && [ -z "$(which notify-send)" ]; then
SCRIPT_LOCATION="$(pwd)/$(basename $0)"
if [ -n "$(which zenity)" ]; then
zenity --warning --text "Notifcations failed! Please install the libnotify-bin package or disable notifications in $SCRIPT_LOCATION" --title "Panel Lock Down"
else
echo "Panel Lock Down: Notifcations failed! Please install the libnotify-bin package or disable notifications in $SCRIPT_LOCATION"
fi
NOTIFY="off"
fi
### Main
if [ "$(gconftool-2 -g /apps/panel/global/locked_down)" = "true" ]; then
[ "$NOTIFY" = "on" ] && notify-send -i $UNLOCK_ICON "$UNLOCK_TITLE" "$UNLOCK_MSG"
gconftool-2 -s /apps/panel/global/locked_down --type=bool false
elif [ "$(gconftool-2 -g /apps/panel/global/locked_down)" = "false" ]; then
[ "$NOTIFY" = "on" ] && notify-send -i $LOCK_ICON "$LOCK_TITLE" "$LOCK_MSG"
gconftool-2 -s /apps/panel/global/locked_down --type=bool true
else
if [ -n "$(which zenity)" ]; then
zenity --warning --text "Error. Undefined state of global panel lock down!" --title "Panel Lock Down"
else
echo 'Panel Lock Down: Error. Undefined state of global panel lock down!'
fi
exit 1
fi
As the upload tool of launchpad doesn't work right now, here is my lazy lock down script:
#!/bin/sh
### Config MSG="Unlocking the GNOME panel" "/usr/share/ icons/hicolor/ 48x48/apps/ gdu-encrypted- lock.png" ICON="/ usr/share/ icons/hicolor/ 48x48/apps/ gdu-encrypted- unlock. png"
NOTIFY=on #(on/off)
LOCK_TITLE="Panel Lock Down"
LOCK_MSG="Locking the GNOME panel"
UNLOCK_TITLE="Panel Lock Down"
UNLOCK_
LOCK_ICON=
UNLOCK_
### Dependency checking LOCATION= "$(pwd) /$(basename $0)"
if [ -z "$(which gconftool-2)" ]; then
if [ -n "$(which gconftool-2)" ]; then
zenity --warning --text "Error. No binary found for gconftool-2!" --title "Panel Lock Down"
else
echo "Panel Lock Down: Error. No binary found for gconftool-2!"
fi
exit 1
fi
if [ "$NOTIFY" = "on" ] && [ -z "$(which notify-send)" ]; then
SCRIPT_
if [ -n "$(which zenity)" ]; then
zenity --warning --text "Notifcations failed! Please install the libnotify-bin package or disable notifications in $SCRIPT_LOCATION" --title "Panel Lock Down"
else
echo "Panel Lock Down: Notifcations failed! Please install the libnotify-bin package or disable notifications in $SCRIPT_LOCATION"
fi
NOTIFY="off"
fi
### Main global/ locked_ down)" = "true" ]; then global/ locked_ down --type=bool false global/ locked_ down)" = "false" ]; then global/ locked_ down --type=bool true
if [ "$(gconftool-2 -g /apps/panel/
[ "$NOTIFY" = "on" ] && notify-send -i $UNLOCK_ICON "$UNLOCK_TITLE" "$UNLOCK_MSG"
gconftool-2 -s /apps/panel/
elif [ "$(gconftool-2 -g /apps/panel/
[ "$NOTIFY" = "on" ] && notify-send -i $LOCK_ICON "$LOCK_TITLE" "$LOCK_MSG"
gconftool-2 -s /apps/panel/
else
if [ -n "$(which zenity)" ]; then
zenity --warning --text "Error. Undefined state of global panel lock down!" --title "Panel Lock Down"
else
echo 'Panel Lock Down: Error. Undefined state of global panel lock down!'
fi
exit 1
fi