From ea9abc7ffbd4ea83460d76e555da7ad621cba632 Mon Sep 17 00:00:00 2001 From: gk Date: Thu, 27 Aug 2020 04:52:50 +1000 Subject: [PATCH] Don't detect sandbox as WM (Closes #23) Check if string starts with 'b', 'f', or 'o' and ends with 'box' (blackbox, fluxbox, openbox) --- fet.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fet.sh b/fet.sh index 891daae..5809a06 100755 --- a/fet.sh +++ b/fet.sh @@ -51,14 +51,12 @@ if [ -e /proc/$$/comm ]; then done ## WM/DE - # standard variables, mostly used for DEs - [ "$DISPLAY" ] && [ ! "$wm" ] && - # non-standard WMs + [ ! "$wm" ] && # loop over all processes and check the binary name for i in /proc/*/comm; do read -r c < "$i" case $c in - awesome|xmonad*|qtile|sway|i3|*box*|*wm*) wm="${c%%-*}"; break;; + awesome|xmonad*|qtile|sway|i3|[bfo]*box|*wm*) wm="${c%%-*}"; break;; esac done