Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
22 lines
673 B
Bash
22 lines
673 B
Bash
#!/bin/sh
|
|
|
|
GSETTINGS=$(whereis -b gsettings | awk '{print $2}')
|
|
SED=$(whereis -b sed | awk '{print $2}')
|
|
|
|
if [ -z "$GSETTINGS" ]; then
|
|
echo "Command 'gsettings' not found!"
|
|
exit 1
|
|
fi
|
|
|
|
RESOULT=$("$GSETTINGS" get com.canonical.Unity.Panel systray-whitelist || echo "")
|
|
|
|
if [ -n "$RESOULT" ]; then
|
|
HIME=$(echo "$RESOULT" | grep hime)
|
|
if [ -z "$HIME" ]; then
|
|
NEW_SCHEMA=$("$GSETTINGS" get com.canonical.Unity.Panel systray-whitelist | "$SED" -e "s/]$/, \'hime\']/")
|
|
"$GSETTINGS" set com.canonical.Unity.Panel systray-whitelist "$NEW_SCHEMA"
|
|
else
|
|
echo "'hime' is already in the systray-whitelist of Unity Panel. exiting..."
|
|
fi
|
|
fi
|