[Xmonad] XFetchName?

Spencer Janssen sjanssen at cse.unl.edu
Fri Apr 20 03:55:28 EDT 2007

On Thu, 19 Apr 2007 19:41:05 -0700
David Roundy <droundy at darcs.net> wrote:

> Hi all,
> I've been looking into how to make xmonad a bit smarter about laying
> out windows, and was trying to find out some way to extract some sort
> of information regarding the windows, and am basically at a loss.  I
> decided to give up for now when I found the comment
> -- XFetchName omitted
> X11/Graphics/X11/Xlib/Misc.hsc

Yes, the X11 package is woefully incomplete -- hence the existence of

> Does anyone have an idea how to get this sort of information? I know
> we *should* be able to access the name and class of each window, but
> can't see how to actually do so.  :(

My general strategy when I want to implement something, but don't
know which xlib calls are needed:

1.  Find some source that accomplishes a similar task (dwm is a great
candidate, it has very nice code)

2.  Notice which xlib functions are called

3.  grep X11 to see if these calls are implemented

4.  If 3 is unsuccessful, read the man pages and write some FFI for

Spencer Janssen

More information about the Xmonad mailing list