rendered paste body# WM Detection - Begin
if [[ "$display" =~ "WM" ]]
then
WM="Not Found"
for each in $wmnames
do
if pidof $each >/dev/null
then
[ "$each" == "fluxbox" ] && WM="FluxBox"
[ "$each" == "openbox" ] && WM="OpenBox"
[ "$each" == "blackbox" ] && WM="BlackBox"
[ "$each" == "xfwm4" ] && WM="Xfwm4"
[ "$each" == "metacity" ] && WM="Metacity"
[ "$each" == "kwin" ] && WM="KWin"
[ "$each" == "icewm" ] && WM="IceWM"
[ "$each" == "pekwm" ] && WM="PekWM"
fi
done
fi
# WM Detection - End
to...
# WM Detection - Begin
if [[ "$display" =~ "WM" ]]
then
for each in $wmnames
do
if pidof $each >/dev/null
then
case $each in
'fluxbox') WM="FluxBox";;
'openbox') WM="OpenBox";;
'blackbox') WM="blackbox";;
'xfwm4') WM="Xfwm4";;
'metacity') WM="Metacity";;
'kwin') WM="KWin";;
'icewm') WM="IceWM";;
'pekwm') WM="PekWM";;
*) WM="Not Found";;
esac
fi
done
fi
# WM Detection - End