pykompiz 0.1.3
system tray controller for Compiz & KDE, written in Python.

What's New
----------

*Version 0.1.3*

- fix bug #2: call to setProgramLogo fails.

License
-------

Copyright (c) 2006 Andrew Barr <andrew.james.barr at gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

Attributions
------------

This program borrows code and/or ideas from:
 - compiz-start from the compiz-vanilla-aiglx "quinn" Debian/Ubuntu package
 - the example programs included in the PyKDE distribution

Thank you to the authors of that code for making it available.

Todo List
---------

pyKompiz is feature complete but some miscellaneous tasks remain.

- native distribution packages.
- acceptance into existing Xgl/AIGLX/Compiz packages.
- better installation/"build" system.
- fix bugs! :)
- ideas (and patches!) welcome at <andrew.james.barr at gmail.com>

Known Bugs/Issues
-----------------

- gset-compiz does not have focus when invoked

This appears to be a bug in that program, maybe relating to being 
run under KDE, as invoking it via other methods yields the same result for me.

- nVidia, Xgl: --strict-binding causes problems

If you are using an nVidia card on Xgl you need to remove this parameter from the
execution function for Compiz, or you will get some graphical strangeness on startup.
I'm not sure how to find out if this is required or not. Please report to me if this
happens to you using --strict-binding, regardless of your X server and hardware. Please
include that information in your report though. Thanks.


DCOP interface
--------------

This is really intended to be called from suspend/resume scripts
so that Compiz can be turned off over a suspend cycle if this is necessary.
The 'dcop' command-line client makes this really easy to do from a suspend
script running as root:

dcop --all-users --all-sessions ...

The following methods are available:

int suspend()

save the active window manager, THEN switch to KWin. Returns 0 on success
or 1 if any exceptions are thrown.

int resume()

activate Compiz if was the active window manager before suspend() was called.
Otherwise, do nothing. Returns 0 on success and 1 if any exceptions are thrown.

int switchToKwin()
int restartCompiz()

call the same methods as the menu items. Returns 0 on success and 1 if any
exceptions are thrown.

Suspend/Resume
--------------

using the methods above it is very easy to deactivate compiz over a suspend
cycle. Before suspending, one might run this command:

dcop --all-users --all-sessions pykompiz pykompiz suspend

Optionally, you can abort the suspend cycle if a '1' is output to stdout. Then,
after resuming, you would run:

dcop --all-users --all-sessions pykompiz pykompiz resume

This will remember the active window manager before suspending was initiated,
i.e. it will not switch to Compiz if you were using Kwin when you suspended.

Startup behavior
----------------

On startup, pykompiz will only switch to Compiz on startup if it was active
when you exited last. Otherwise, it will keep KWin active.

This is useful for remembering the active window manager across KDE sessions,
if you were to add pykompiz to the session startup list (~/.kde/Autostart)

Download
--------

The latest version will always be available from:

http://www.oakcourt.dyndns.org/projects/pykompiz/pykompiz-0.1.3.tar.gz

I am not providing Debian/Ubuntu packaging because I would like to get this
script added to the widely-used Debian/Ubuntu compiz packages available elsewhere.
When they are available in such a manner, I will update this space.

If you package pykompiz for any distribution, please e-mail me so I may link
to it here.

Installation
------------

If you are not using a distribution package, run the 'install.sh' script included
in the tarball. It will drop the python script executable into /usr/bin and place
the pixmap files where needed. It checks for gset-compiz in your PATH but does
not check to see that you have the KDE and Qt Python bindings installed. These
are required for operation of pykompiz.

Note that users of distributions with multiple versions of Python need the bindings
installed for their default Python interpreter, the one executed by the command
'env python'.

Session Startup
---------------

NOTE: This will be automagically cared for in a later release...

You need to place a .desktop file in ~/.kde/Autostart. See freedesktop.org
for the .desktop file specification on how to create .desktop files. ksmserver
also supports system-wide autostart .desktop files, they go in an 'autostart'
folder that varies depending on your distribution setup:

Debian/Ubuntu: /usr/share/autostart
Gentoo: /usr/kde/<version>/autostart
Others: find it please and let me know where it is!

Contact
-------

I am available at <andrew.james.barr at gmail.com> if you need to reach me for
any reason.

------------------------------------------------------------------------------------
Copyright (c) 2006 Andrew Barr
Last Updated: May 27, 2006

