Two State Lanuncher for Compositor

Bob Snyder bob.snyder at cox.net
Sat Apr 23 19:36:42 CEST 2005


I like to use the compositor feature of xfwm4, but some apps don't work 
well with it. I'd like to be able to turn it on and off easily, and I've 
been trying to get the trigger launcher (aka two-state launcher) to do it.

The trigger launcher calls a user written script to do the actual work. 
The script needs to work with three different inputs: '1' to turn the 
app on, '0' to turn the app off, and no argument to make the script 
return the current state to stdout.

So I've got this:

#!/bin/sh

if [ "$1" = "1" ] ; then
    killall xfwm4 ; exec xfwm4 --compositor=on
elif [ "$1" = "0" ] ; then
    killall xfwm4 ; exec xfwm4 --compositor=off
else
    ?????
    case $? in
    0) echo 1 ;;
    1) echo 0 ;;
    esac
fi

Is there any way to query the compositor to tell if it's running? 
Perhaps there's a better way to go about the whole thing.

Suggestions appreciated.

Bob S.





More information about the Xfce mailing list