From 4be66e94bda1747d2193002bc1d57c3505fc0bb3 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 17 Oct 2016 18:39:56 +1100 Subject: [PATCH] wm: Add support for Windows WMs and Shells --- neofetch | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index b2f5a61e..1bdc56f9 100755 --- a/neofetch +++ b/neofetch @@ -537,18 +537,23 @@ getwm() { # Fallback for Wayland wms case "$wm" in - "xwlc") - wm="$(ps -e | grep -m 1 -oE "sway|orbment|velox|orbital")" - [ "$version" -ge 4 ] && wm="${wm^}" - ;; + "xwlc") wm="$(ps -e | grep -m 1 -oE "sway|orbment|velox|orbital")" ;; esac else case "$os" in "Mac OS X") wm="Quartz Compositor" ;; - "Windows") wm="Explorer" ;; + "Windows") + wm="$(tasklist | grep -m 1 -o "bugn\|Windawesome\|blackbox\|emerge\|litestep")" + [ -z "$wm" ] && wm="Explorer" + ;; esac fi + + # Don't uppercase i3 + [ "$version" -ge 4 ] && \ + [ "$wm" != "i3" ] && \ + wm="${wm^}" } # }}}