From 17cb578611a2bad99fcc24d48b93dc987d46cfd0 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 14 Jul 2017 12:03:01 +0200 Subject: [PATCH] WM: Fix/add Window Maker detection --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index f0419257..ee65e4c2 100755 --- a/neofetch +++ b/neofetch @@ -663,11 +663,14 @@ get_wm() { if [[ -n "$DISPLAY" && "$os" != "Mac OS X" ]]; then 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/\"}" wm="${wm/\"*}" + # Window Maker does not set _NET_WM_NAME + [[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker" + # Fallback for Wayland wms. [[ "$wm" == "xwlc" ]] && \ wm="$(ps -e | grep -m 1 -o -F -e "sway" -e "orbment" -e "velox" -e "orbital")"