[FIX][SCRIPT] Notify Xautolock toggling errors
This commit is contained in:
parent
d1e177a2dd
commit
721453c80f
|
@ -10,7 +10,14 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
xautolock "-$1"
|
notify() {
|
||||||
|
notify-send -u "${2:-low}" "$1" \
|
||||||
|
-h string:x-canonical-private-synchronous:xautolock-toggle # Overwrite
|
||||||
|
}
|
||||||
|
|
||||||
notify-send -u low "Toggled Xautolock (${1}d)" \
|
if ! xautolock "-$1"; then
|
||||||
-h string:x-canonical-private-synchronous:xautolock-toggle # Override previous one
|
notify "Could not toggle Xautolock" critical
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
notify "Toggled Xautolock (${1}d)"
|
||||||
|
|
Loading…
Reference in a new issue