You could install wmctrl
:
sudo apt-get install wmctrl
This is what apt-cache show wmctrl
has for my system (13.10):
Description-en: control an EWMH/NetWM compatible X Window Manager
Wmctrl is a command line tool to interact with an
EWMH/NetWM compatible X Window Manager (examples include
Enlightenment, icewm, kwin, metacity, and sawfish).
.
Wmctrl provides command line access to almost all the features
defined in the EWMH specification. For example it can maximize
windows, make them sticky, set them to be always on top. It can
switch and resize desktops and perform many other useful
operations.
Then, man wmctrl
tells us that the -l
option will:
List the windows being managed by the window manager. One
line is output for each window, with the line broken up
into space separated columns. The first column always con‐
tains the window identity as a hexadecimal integer, and the
second column always contains the desktop number (a -1 is
used to identify a sticky window). If the -p option is
specified the next column will contain the PID for the win‐
dow as a decimal integer. If the -G option is specified
then four integer columns will follow: x-offset, y-offset,
width and height. The next column always contains the
client machine name. The remainder of the line contains the
window title (possibly with multiple spaces in the title).
and that -x
will
Include WM_CLASS in the window list or interpret as the WM_CLASS name.
Here is what I see when I run wmctrl -lx
with six different applications open:
[07:37 AM] ~ $ wmctrl -lx
0x01c00008 -1 tint2.Tint2 N/A tint2
0x02400096 0 Navigator.Firefox vasa1-Inspiron-1545 12.04 - Which are the windows that are in the current workspace? - Ask Ubuntu - Mozilla Firefox
0x02600004 0 Thunar.Thunar vasa1-Inspiron-1545 _MyMkd - File Manager
0x01a00004 0 lxterminal.Lxterminal vasa1-Inspiron-1545 LXTerminal
0x02200021 0 geany.Geany vasa1-Inspiron-1545 wmctrl.mkd - /home/vasa1/Dropbox/_MyMkd - Geany
0x02800003 0 leafpad.Leafpad vasa1-Inspiron-1545 (Untitled)
0x02a00003 0 gcolor2.Gcolor2 vasa1-Inspiron-1545 gcolor2
[07:37 AM] ~ $