wm: Fix issue with dwm. Closes #1433
This commit is contained in:
parent
566c8096da
commit
c155bdecd1
21
neofetch
21
neofetch
|
@ -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")
|
||||||
|
|
Reference in New Issue