mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-22 11:39:53 +00:00
WM: Fix/add Window Maker detection
This commit is contained in:
5
neofetch
5
neofetch
@@ -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")"
|
||||||
|
|||||||
Reference in New Issue
Block a user