Merge branch 'master' of github.com:dylanaraps/neofetch into master

This commit is contained in:
Dylan Araps 2020-10-04 14:12:09 +03:00
commit bc4c3bc8f9
1 changed files with 37 additions and 29 deletions

View File

@ -1821,35 +1821,43 @@ get_wm() {
*) ps_flags=(-e) ;; *) ps_flags=(-e) ;;
esac esac
if [[ $WAYLAND_DISPLAY ]]; then if [[ -O "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY:-wayland-0}" ]]; then
wm=$(ps "${ps_flags[@]}" | grep -m 1 -o -F \ if tmp_pid="$(lsof -t "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY:-wayland-0}" 2>&1)" ||
-e arcan \ tmp_pid="$(fuser "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY:-wayland-0}" 2>&1)"; then
-e asc \ wm="$(ps -p "${tmp_pid}" -ho comm=)"
-e clayland \ else
-e dwc \ # lsof may not exist, or may need root on some systems. Similarly fuser.
-e fireplace \ # On those systems we search for a list of known window managers, this can mistakenly
-e gnome-shell \ # match processes for another user or session and will miss unlisted window managers.
-e greenfield \ wm=$(ps "${ps_flags[@]}" | grep -m 1 -o -F \
-e grefsen \ -e arcan \
-e kwin \ -e asc \
-e lipstick \ -e clayland \
-e maynard \ -e dwc \
-e mazecompositor \ -e fireplace \
-e motorcar \ -e gnome-shell \
-e orbital \ -e greenfield \
-e orbment \ -e grefsen \
-e perceptia \ -e kwin \
-e rustland \ -e lipstick \
-e sway \ -e maynard \
-e ulubis \ -e mazecompositor \
-e velox \ -e motorcar \
-e wavy \ -e orbital \
-e way-cooler \ -e orbment \
-e wayfire \ -e perceptia \
-e wayhouse \ -e rustland \
-e westeros \ -e sway \
-e westford \ -e ulubis \
-e weston) -e velox \
-e wavy \
-e way-cooler \
-e wayfire \
-e wayhouse \
-e westeros \
-e westford \
-e weston)
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 && { type -p xprop &>/dev/null && {