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