Don't detect sandbox as WM (Closes #23)

Check if string starts with 'b', 'f', or 'o' and ends with 'box' (blackbox, fluxbox, openbox)
This commit is contained in:
gk committed 2020-08-27 04:52:50 +10:00
1 parent accf87f751
commit ea9abc7ffb
1 file changed
+2 -4
+2 -4
View File
@@ -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