[xmonad] Regexp WM_NAME ?
gwern0 at gmail.com
Sun May 13 18:37:40 CEST 2012
Lift whatever string-match or regexp function you need to the monad?
For example, it looks like you could match isInfixOf on (/tmp); here's
an existing example
q ~? x = fmap (x `isInfixOf`) q
myManageHook = (composeAll . concat $ --shifting actions
[ [ title =? x --> doCenterFloatToAll | x <- important ]
, [ className =? "Skype" <&&> title ~? "Call with " -?>
doSideFloat' CE ]
On Sun, May 13, 2012 at 12:33 PM, Pablo Olmos de Aguilera C.
<pablo at glatelier.org> wrote:
> 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 :(
> Pablo Olmos de Aguilera Corradini - @PaBLoX
> Linux User: #456971 - http://counter.li.org/
> xmonad mailing list
> xmonad at haskell.org
More information about the xmonad