#!/bin/bash me="$(readlink -f "$0")" timeout=300 notify=10 configure() { xset s $((timeout - notify)) $notify xset dpms $((timeout * 3)) $((timeout * 4)) $((timeout * 5)) } unconfigure() { xset s 0 xset dpms 0 0 0 } case "$1" in start) configure exec xss-lock -s ${XDG_SESSION_ID} -n "$me notify" -l $me lock ;; dim|notify) echo "notify: start" trap 'echo notify: user activity; kill %% 2> /dev/null; exit 0' HUP # user activity trap 'echo notify: locker started; kill %% 2> /dev/null; exit 0' TERM # locker started for i in $(seq 1.0 -0.1 0.1); do awesome-client <