Merge pull request #774 from mstraube/wmaker

WM: Fix/add Window Maker detection
This commit is contained in:
Dylan Araps 2017-07-14 21:36:11 +10:00 committed by GitHub
commit 30d8f5e8ac

View file

@ -663,11 +663,14 @@ get_wm() {
if [[ -n "$DISPLAY" && "$os" != "Mac OS X" ]]; then if [[ -n "$DISPLAY" && "$os" != "Mac OS X" ]]; then
id="$(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}')" id="$(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}')"
wm="$(xprop -id "$id" -notype -f _NET_WM_NAME 8t)" wm="$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)"
wm="${wm/*_NET_WM_NAME = }" wm="${wm/*_NET_WM_NAME = }"
wm="${wm/\"}" wm="${wm/\"}"
wm="${wm/\"*}" wm="${wm/\"*}"
# Window Maker does not set _NET_WM_NAME
[[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker"
# Fallback for Wayland wms. # Fallback for Wayland wms.
[[ "$wm" == "xwlc" ]] && \ [[ "$wm" == "xwlc" ]] && \
wm="$(ps -e | grep -m 1 -o -F -e "sway" -e "orbment" -e "velox" -e "orbital")" wm="$(ps -e | grep -m 1 -o -F -e "sway" -e "orbment" -e "velox" -e "orbital")"