#!/bin/sh
SERVICE='compiz'
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
xfwm4 --replace
else
compiz --replace
fi
If you want to adapt this script to suit your needs, SERVICE= is the name of the process that will be tested if its running.
'then' is the action that will be done if the process is runing (in this case, launch xfwm4 with --replace argument for taking over compiz)
'else' is the action that will be done if the process is NOT running (in this case, launch compiz with --replace argument for taking over wfmw4
No hay comentarios:
Publicar un comentario