WMIface - KDE Window Manager DCOP Interface

This KDED module allows DCOP scripting of the running window manager (usually KWin, but a separate module allows scripting any EWMH-compatible window manager that's running in KDE).

Download here (or, if you know how to add the admin/ directory yourself, here).

SUSE packages (unsupported): 10.1 10.0

See README for details.

Three examples:

Launch Konqueror showing http://kde.org, close it after 10 seconds

konqueror http://dot.kde.org --name dotkonqueror &
sleep 10
window=$(dcop kded wmiface findNormalWindows "" "dotkonqueror Konqueror" "" "" 0 false)
dcop kded wmiface closeWindow $window

Cycle virtual desktops slowly

while true; do
    sleep 10
    desktop=$(dcop kded wmiface currentDesktop)
    total=$(dcop kded wmiface numberOfDesktops)
    if test $desktop = $total; then
	dcop kded wmiface setCurrentDesktop 1
    else
	dcop kded wmiface setCurrentDesktop $(( desktop + 1 ))
    fi
done

Minimize all KWrite windows

dcop kded wmiface findNormalWindows "" " Kwrite" "" "" 0 false | \
    while read ln; do
	dcop kded wmiface minimize $ln
    done

Lubos Lunak <l.lunak suse.cz> <l.lunak kde.org>