[Kde-announce-apps] WMIface 0.1

Lubos Lunak l.lunak at kde.org
Tue Jun 6 20:21:56 CEST 2006

Name: WMIface
Version: 0.1
Type: System Tool
Depend: KDE 3.x
License: X11
Homepage: http://ktown.kde.org/~seli/wmiface/
More Info:

 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

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
        dcop kded wmiface setCurrentDesktop $((
desktop + 1 ))

Minimize all KWrite windows

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

More information about the Kde-announce-apps mailing list