]> code.delx.au - mediapc-tools/blobdiff - xfdesktop-focus-fix
run-every-5sec.service
[mediapc-tools] / xfdesktop-focus-fix
index 3517158dfdb5e873201869a71d0327188e835f3f..1927c4394f3f38c9e3b4dc695508b965940ec119 100755 (executable)
@@ -4,9 +4,6 @@ function has_active_window {
     xprop -root -f _NET_ACTIVE_WINDOW 32c ' $0\n' _NET_ACTIVE_WINDOW | awk '{ exit $2 == 0 }'
 }
 
-while true; do
-    if ! has_active_window; then
-        xdotool search --onlyvisible --class xfdesktop windowfocus
-    fi
-    sleep 5
-done &> /dev/null
+if ! has_active_window; then
+    xdotool search --onlyvisible --class xfdesktop windowfocus
+fi