[xmonad] Re: Hello, and firefox

TeXitoi texitoi at texitoi.homelinux.org
Fri Jun 13 08:11:01 EDT 2008

Devin Mullins <me at twifkak.com> writes:

> On Thu, Jun 12, 2008 at 06:22:02PM -0700, David Roundy wrote:
> > A hokier but simpler approach (if you plan on always leaving a firefox
> > window open on workspace 2) would be to simply check if there are any
> > windows in workspace 2.
> So, in addition to this approach, I can think of two others:
> 1. startupHook is run just after windows have been mapped (see the
> definition of xmonad in XMonad/Main.hsc), so you can check for any
> existing Firefox windows there and only there. At that point, you could
> either iterate over all windows and runQuery a special ManageHook that's
> not part of your usual manageHook, or use XMonad.Util.WindowProperties.
> (I'm not sure which is better.)
> 2. The cooler (but much harder) option would be something like
> XMonad.Hooks.ServerMode. You'd establish an EventHook that listened for
> a "shift-to-workspace" ClientMessageEvent. Then, you'd write a custom
> X11 client that looked up the Firefox window and sent the appropriate
> ClientMessage to the root window.
> Ideally, this could be generalized to something I've wanted to see: a
> `float` command that ran $*, tracked all of the windows it spawned, and
> asked xmonad to float them. (I'm not sure if that's possible, though.
> And, yes, I know you didn't want to float. I'm digressing.)
> Disclaimer: I may be on crack.

maybe an other solution would be using the "session manager" of some
desktop env such as XFCE, that lanch apps at starting on a given
workspace.  You should need XMonad.Hooks.EwmhDesktops.

See http://haskell.org/haskellwiki/Xmonad/Using_xmonad_in_XFCE

Guillaume Pinot                  http://www.irccyn.ec-nantes.fr/~pinot/

``Computers are good at following instructions, but not at reading your
mind.'' -- Donald E. Knuth, the TeXbook

()  ASCII ribbon campaign      -- Against HTML e-mail 
/\  http://www.asciiribbon.org -- Against proprietary attachments

More information about the xmonad mailing list