rendered paste body# WM Detection - Begindetectwm () { WM="Not Found" userId="$(id -u ${USER})" for each in $wmnames; do PID="$(pgrep -U ${userId} $each)" if $PID; then 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";; 'fvwm') WM="FVWM";; 'dwm') WM="DWM";; 'awesome') WM="Awesome";; 'WindowMaker') WM="WindowMaker";; esac fi fi done [ "$verbosity" -eq "1" ] && verboseOut "Finding window manager...found as '$WM'"}# WM Detection - End