Toggle Compiz On & Off
I use the following bash script to toggle on & off the compiz effects.
I've enhanced the original script by using zenity to display an information window depending on whether compiz effects are turned on or off.
On the bottom Gnome panel on my desktop I have an XGL icon (red & yellow icon with a white 'X'), which launches the script.
#!/bin/bash
#
# Checks to see if process "compiz.real" is running.
pid=`ps --no-heading -C compiz.real | cut -d "?" -f1`;
if [ -n "$pid" ]; then
zenity --info --text="Turning off XGL Compiz effects. Replacing window thememanager with Metacity.";
kill -9 $pid
metacity --replace &
else
zenity --info --text="Turning on XGL Compiz wibbly wobbly windows effects";
gnome-window-decorator &
compiz --replace gconf transset decoration wobbly fade minimize cube rotate zoom scale move resize place switcher &
fi
I've enhanced the original script by using zenity to display an information window depending on whether compiz effects are turned on or off.
On the bottom Gnome panel on my desktop I have an XGL icon (red & yellow icon with a white 'X'), which launches the script.
0 Comments:
Post a Comment
<< Home