[herbstluftwm] Fix hlwm-run-or-raise

It was working fine, but when there is only a single window there is no second
one to get.
This commit is contained in:
Tom Willemse 2022-06-16 20:42:22 -07:00
parent ce74016324
commit 4e500192eb

View file

@ -39,7 +39,8 @@ exec scsh -s "$0" "$@"
(if (not (null? window-ids)) (if (not (null? window-ids))
(let ((next-window (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)) (cadr (pull-element-to-front current-window-id window-ids))
(car window-ids)))) (car window-ids))))
(run (hlwm-switch-to-window ,next-window))) (run (hlwm-switch-to-window ,next-window)))