[ltp] [OT]: KDE hack: script to list and control windows?

Matt Graham linux-thinkpad@linux-thinkpad.org
Thu, 23 Feb 2006 20:29:23 -0500


> I'm trying to find some shell functions which will allow me to list =

> windows and to maximise/minimise them.

Install wmctrl and use it.  "wmctrl -l" , "wmctrl -r WINDOW -b maximize"

> This would either be done by X or perhaps DCOP.

DCOP is a neat idea, but the functions you need may not be there for all
programs.

> Also, is there any obvious way to convert between X's WINDOW_ID and the=
 =

> PID of the process?

Hell no.  wmctrl may or may not list PIDs for running X clients, dependin=
g on
various factors.  It looks like KDE and GNOME apps and Firefox usually ha=
ve
PIDs listed, but xeyes and xterm don't.  Running an X client on a remote
machine means that no PID will be available for that client on your local=

machine, naturally.  HTH,


-- =

Matt G / Dances With Crows
There is no Darkness in Eternity/But only Light too dim for us to see
"I backed up my brain to tape, but tar says the tape contains no data....=
"