wm: Fix issue with dwm. Closes #1433

This commit is contained in:
Dylan Araps 2020-10-04 14:50:26 +03:00
parent 566c8096da
commit c155bdecd1
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 13 additions and 14 deletions

View File

@ -1860,17 +1860,7 @@ get_wm() {
fi fi
elif [[ $DISPLAY && $os != "Mac OS X" && $os != "macOS" && $os != FreeMiNT ]]; then elif [[ $DISPLAY && $os != "Mac OS X" && $os != "macOS" && $os != FreeMiNT ]]; then
type -p xprop &>/dev/null && { # non-EWMH WMs.
id=$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)
id=${id##* }
wm=$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)
wm=${wm/*WM_NAME = }
wm=${wm/\"}
wm=${wm/\"*}
}
# Fallback for non-EWMH WMs.
[[ $wm ]] ||
wm=$(ps "${ps_flags[@]}" | grep -m 1 -o \ wm=$(ps "${ps_flags[@]}" | grep -m 1 -o \
-e "[s]owm" \ -e "[s]owm" \
-e "[c]atwm" \ -e "[c]atwm" \
@ -1882,6 +1872,15 @@ get_wm() {
-e "[x]11fs" \ -e "[x]11fs" \
-e "[x]monad") -e "[x]monad")
[[ -z $wm ]] && type -p xprop &>/dev/null && {
id=$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)
id=${id##* }
wm=$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)
wm=${wm/*WM_NAME = }
wm=${wm/\"}
wm=${wm/\"*}
}
else else
case $os in case $os in
"Mac OS X"|"macOS") "Mac OS X"|"macOS")