[xmonad] Re: Floating gnome-do

Braden Shepherdson Braden.Shepherdson at gmail.com
Tue Jul 8 11:21:01 EDT 2008


Tom Thorne wrote:
> I've been trying to get a floating gnome-do without much success, I've
> never programmed haskell before so i'm just cutting and pasting other
> peoples xmonad.hs together!
> 
> this is what my xmonad.hs looks like (I don't have a haskell mode for
> emacs either hence the no doubt hideous indentation)
> 
> import XMonad
> import XMonad.Hooks.ManageDocks
> import XMonad.Hooks.DynamicLog
> 
> main = dzen $ \x -> xmonad $x
>      {
>       	terminal = "terminal"
>      , focusedBorderColor = "blue"
>      , manageHook = myMHook <+> manageHook defaultConfig
>      , layoutHook = avoidStruts $ layoutHook defaultConfig
>      }
> 
> myMHook = composeAll . concat $
> 	[
>         [manageDocks],
> 	[resource =? "Do.exe" --> doIgnore,
> 
> 	title =? "Downloads" --> doFloat
> 	]
>         ]
> 
> Obviously this doesnt work


I don't have Gnome so I can't just check it, but here's how you find the 
names used for a ManageHook. Run the app you want to check, then run 
xprop in a terminal. Click on the app's window, and then examine the 
output from xprop. About ten lines up the bottom will be a line like this:

WM_CLASS(STRING) = "gecko", "Thunderbird-bin"

The first field, "gecko", is the resource name, the second is the class 
name. So I could write a ManageHook for Thunderbird like this:

resource =? "gecko" --> doFloat

or like this

class =? "Thunderbird-bin" --> doFloat

Class names are usually better than resource names, as they tend to be 
unique more often.


Braden Shepherdson
shepheb



More information about the xmonad mailing list