From deda13603d44e0a0aaab5a5f94f103864c64f257 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 5 Jun 2022 22:52:01 -0700 Subject: Make sure there are enough windows before trying to pick the next --- hlwm-run-or-raise | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hlwm-run-or-raise b/hlwm-run-or-raise index 0657088..6fe23c8 100755 --- a/hlwm-run-or-raise +++ b/hlwm-run-or-raise @@ -39,7 +39,8 @@ exec scsh -s "$0" "$@" (if (not (null? window-ids)) (let ((next-window - (if (member current-window-id window-ids) + (if (and (> (length window-ids) 1) + (member current-window-id window-ids)) (cadr (pull-element-to-front current-window-id window-ids)) (car window-ids)))) (run (hlwm-switch-to-window ,next-window))) -- cgit v1.2.3-54-g00ecf