From a44ed602d1ef34851bc43ccd12df4cbd9d9b65ce Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 20 Jan 2020 15:16:23 +0100 Subject: [PATCH] xss-lock: don't error if kill doesn't work Most of the time, kill doesn't have anything to kill. --- bin/xss-lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/xss-lock b/bin/xss-lock index 8046725..0d2de9d 100755 --- a/bin/xss-lock +++ b/bin/xss-lock @@ -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