From bfb8c77781769efc57ea61747f2ac5d133f77a41 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 12 Sep 2014 14:53:59 +0200 Subject: [PATCH] lock: sleep a bit to let i3lock lock the screen We could let i3lock fork to notify us but then, we have to spy on it to know when the screen is unlocked. --- bin/xss-lock | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/xss-lock b/bin/xss-lock index e39af78..0a6a31e 100755 --- a/bin/xss-lock +++ b/bin/xss-lock @@ -26,6 +26,7 @@ case "$1" in if [ -e /proc/self/fd/${XSS_SLEEP_LOCK_FD:--1} ]; then trap 'kill %%' TERM INT i3lock -n $i3lock_options {XSS_SLEEP_LOCK_FD}<&- & + sleep 0.3 # Slight race condition, better than an active loop exec {XSS_SLEEP_LOCK_FD}<&- wait else