aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/lock9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/lock b/bin/lock
index f32a444..8a8fa90 100755
--- a/bin/lock
+++ b/bin/lock
@@ -8,6 +8,13 @@ refocus_fullscreen_nodes() {
done
}
+mark_as_ready() {
+ while [ -z "$(pgrep -x permafocus)" ]; do sleep 1; done
+
+ sleep 2
+ exec ${XSS_SLEEP_LOCK_FD}>&-
+}
+
if [ $(pgrep -x lock | wc -l) -gt 2 ]; then
# Starting multiple screen lock instances may cause unintended side effects
exit 0
@@ -51,6 +58,8 @@ fi
refocus_fullscreen_nodes &
+mark_as_ready &
+
~/bin/permafocus ${PRIMARY_WINDOW} ${SECONDARY_WINDOW}
#