From 5c0f6bfd781fcaa58436985401830b86c04e6025 Mon Sep 17 00:00:00 2001 From: Azalea Date: Sun, 11 Dec 2022 05:26:59 -0500 Subject: [PATCH] [F] Fix wm detection when lsof doesn't exist but fuser exists https://github.com/hykilpikonna/hyfetch/pull/51 --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index c12b8fb5..1692535b 100755 --- a/neofetch +++ b/neofetch @@ -2213,6 +2213,7 @@ get_wm() { if [[ -O "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY:-wayland-0}" ]]; then if tmp_pid="$(lsof -t "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY:-wayland-0}" 2>&1)" || tmp_pid="$(fuser "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY:-wayland-0}" 2>&1)"; then + tmp_pid="$(trim "${tmp_pid##*:}")" wm="$(ps -p "${tmp_pid}" -ho comm=)" else # lsof may not exist, or may need root on some systems. Similarly fuser.