xss-lock: don't error if kill doesn't work

Most of the time, kill doesn't have anything to kill.
This commit is contained in:
Vincent Bernat 2020-01-20 15:16:23 +01:00
parent 9cbd2e30d6
commit a44ed602d1

View file

@ -22,8 +22,8 @@ case "$1" in
echo "notify: start"
pkill -STOP redshift
trap 'pkill -CONT redshift' EXIT
trap 'kill %%; exit 0' HUP
trap 'sleep 1s; kill %%; exit 0' TERM
trap 'kill %% 2> /dev/null; exit 0' HUP
trap 'sleep 1s; kill %% 2> /dev/null; exit 0' TERM
outputs=($(xrandr -q | sed -n 's/\([^ ]*\) connected .*/\1/p'))
for i in $(seq 0.7 -0.01 0.1); do
for out in ${outputs[@]}; do