#!/bin/bash if [ ! -f "compizreader" ] then make all fi FIXSOUND="on" FIXCOMPIZ="on" ONLYSOUND="--only-fix-sound" ONLYCOMPIZ="--only-fix-compiz" SHOWVERBOSE="--verbose" ISVERBOSE="off" for i in $@ do if [ "$i" == "$ONLYSOUND" ] then FIXCOMPIZ="off" elif [ "$i" == "$ONLYCOMPIZ" ] then FIXSOUND="off" elif [ "$i" == "$SHOWVERBOSE" ] then ISVERBOSE="on" fi done if [ "$FIXCOMPIZ" == "on" ] then USINGCOMPIZ='false' if ps -ef | grep -q [c]ompiz then if [ "$ISVERBOSE" == "on" ] then echo "Compiz is running. Attempting to disable..." fi if ls /usr/bin/metacity then if [ "$ISVERBOSE" == "on" ] then echo "Running metacity WM" fi /usr/bin/metacity --replace& USINGCOMPIZ="true" elif ls /usr/bin/kwin then /usr/bin/kwin --replace& if [ "$ISVERBOSE" == "on" ] then echo "Running kwin WM" fi USINGCOMPIZ="true" elif ls /usr/bin/xfwm4 -- replace& then if [ "$ISVERBOSE" == "on" ] then echo "Running xf4 WM" fi /usr/bin/xfwm4 --replace& USINGCOMPIZ="true" else if [ "$ISVERBOSE" == "on" ] then echo "No alternative Window Managers!" fi fi else echo "Compiz is not running. Starting World Of Goo" fi fi if [ "$FIXSOUND" == "on" ] then mv libs/libSDL-1.2.so.0 libs/libSDL-1.2.so.0.backup mv libs/libSDL_mixer-1.2.so.0 libs/libSDL_mixer-1.2.so.0.backup fi ./WorldOfGoo if [ "$FIXSOUND" == "on" ] then mv libs/libSDL-1.2.so.0.backup libs/libSDL-1.2.so.0 mv libs/libSDL_mixer-1.2.so.0.backup libs/libSDL_mixer-1.2.so.0 fi if [ "$FIXCOMPIZ" == "on" ] then if [ "$USINGCOMPIZ" == "true" ] then if [ "$ISVERBOSE" == "on" ] then ./compizreader verbose& echo "Returning to Compiz as Window Manager" else ./compizreader notVerbose& fi fi fi