[xmonad] Trying to code jump-or-execute

Kai Grossjohann kai at emptydomain.de
Fri Feb 1 05:05:47 EST 2008

The extension XMonad.Prompt.Window allows you to enter a window name 
(with completion), then teleports you to that window.  So this extension 
already does what you need: get a list of windows, find the right one.


Joseph Garvin wrote:
> I'm a former sawfish user, and I used to have this really awesome 
> keyboard shortcut called "jump-or-exec". I would press for example 
> Super+F, and if Firefox was not running, it would be executed, and if 
> it was already running, then it would be given focus. I had similar 
> shortcuts for emacs, terminals, etc.
> I'm a bit of a haskell newb -- I can tell that I can simply use 
> 'spawn' to launch a process, and if I had a list of current windows I 
> would know how to iterate through them and find out whether one 
> currently exists, but I don't know how to get such a list. Ideally I'd 
> like to be able to match against window title or class. Is there a way 
> to do this with xmonad?
> ------------------------------------------------------------------------
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad

More information about the xmonad mailing list