dot-files/scripts/toggle-xautolock
Bruno BELANYI b5eb803f9d [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.
2020-12-12 14:12:42 +01:00

17 lines
334 B
Bash
Executable file

#!/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