diff --git a/jumpapp b/jumpapp index d81528e..20566d1 100755 --- a/jumpapp +++ b/jumpapp @@ -379,6 +379,10 @@ get_active_windowid() { list_stacking_order() { local name ids read -r name ids < <(xprop -root ' $0+\n' _NET_CLIENT_LIST_STACKING) + if [[ "$ids" == 'not found.' ]] || [[ "$ids" =~ 'no such atom' ]]; then + # in case the window manager doesn't support _NET_CLIENT_LIST_STACKING (p.e. dwm) + read -r name ids < <(xprop -root ' $0+\n' _NET_CLIENT_LIST) + fi printf '%s\n' "$ids" | tr ',' ' ' }