wm: Fix issue with dwm. Closes #1433
This commit is contained in:
parent
566c8096da
commit
c155bdecd1
1 changed files with 13 additions and 14 deletions
27
neofetch
27
neofetch
|
@ -1860,7 +1860,19 @@ 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.
|
||||||
|
wm=$(ps "${ps_flags[@]}" | grep -m 1 -o \
|
||||||
|
-e "[s]owm" \
|
||||||
|
-e "[c]atwm" \
|
||||||
|
-e "[f]vwm" \
|
||||||
|
-e "[d]wm" \
|
||||||
|
-e "[2]bwm" \
|
||||||
|
-e "[m]onsterwm" \
|
||||||
|
-e "[t]inywm" \
|
||||||
|
-e "[x]11fs" \
|
||||||
|
-e "[x]monad")
|
||||||
|
|
||||||
|
[[ -z $wm ]] && type -p xprop &>/dev/null && {
|
||||||
id=$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)
|
id=$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)
|
||||||
id=${id##* }
|
id=${id##* }
|
||||||
wm=$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)
|
wm=$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)
|
||||||
|
@ -1869,19 +1881,6 @@ get_wm() {
|
||||||
wm=${wm/\"*}
|
wm=${wm/\"*}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Fallback for non-EWMH WMs.
|
|
||||||
[[ $wm ]] ||
|
|
||||||
wm=$(ps "${ps_flags[@]}" | grep -m 1 -o \
|
|
||||||
-e "[s]owm" \
|
|
||||||
-e "[c]atwm" \
|
|
||||||
-e "[f]vwm" \
|
|
||||||
-e "[d]wm" \
|
|
||||||
-e "[2]bwm" \
|
|
||||||
-e "[m]onsterwm" \
|
|
||||||
-e "[t]inywm" \
|
|
||||||
-e "[x]11fs" \
|
|
||||||
-e "[x]monad")
|
|
||||||
|
|
||||||
else
|
else
|
||||||
case $os in
|
case $os in
|
||||||
"Mac OS X"|"macOS")
|
"Mac OS X"|"macOS")
|
||||||
|
|
Loading…
Reference in a new issue