[UPDATE][I3] Move Xautolock toggle to script

To allow notifications when toggling the state of Xautolock, the logic
has been moved to its own script.
This commit is contained in:
Bruno BELANYI 2020-01-27 14:55:52 +01:00
parent aeef0b0ca8
commit b5eb803f9d
2 changed files with 18 additions and 2 deletions

16
scripts/toggle-xautolock Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
case "$1" in
enable|disable)
;;
*)
echo "Unkown command '$1'" >&2
echo "Usage: '$0 <enable|disable>'" >&2
exit 1
;;
esac
xautolock "-$1"
notify-send -u low "Toggled Xautolock (${1}d)" \
-h string:x-canonical-private-synchronous:xautolock-toggle # Override previous one