[xmonad] Regexp WM_NAME ?

Pablo Olmos de Aguilera C. pablo at glatelier.org
Sun May 13 18:33:16 CEST 2012


In pentadactyl (a firefox addon) you can write in an external editor
instead a textbox, by default it spawns a gvim window and everytime it
opens a pentadactyl.txt in tmp folder. Imho that behaviour is way more
easier writing on a floating window.

Using xprop I found the WM_NAME it's the only variable that doesn't
change, so I thought that using it in my myManageHook would do it.

$ xprop | grep 'WM_NAME'
WM_NAME(STRING) = "pentadactyl.txt (/tmp) - GVIM"

myManageHook = (composeAll , concat $
    [ , [ className =? "stalonetray"     --> doIgnore]
    -- a lot of output removed --
    , [ title =? "pentadactyl.txt (/tmp) - GVIM"    --> doFloat]
    ]

I restarted xmonad, reopened the editor and I found that it doesn't
work, I tried to check wm_name again, and guess what?

WM_NAME(STRING) = "pentadactyl.txt (/tmp) - GVIM1"

Obviously the last part "GVIM" changes all the time, so I can't know
in advance which is gonna pick.

There's some way to regexp the wm_name part? Until now, I couldn't
find anything about this topic :(

Regards,
-- 
Pablo Olmos de Aguilera Corradini - @PaBLoX
http://www.glatelier.org/
http://about.me/pablox/
http://www.linkedin.com/in/pablooda/
Linux User: #456971 - http://counter.li.org/



More information about the xmonad mailing list