
On 13 May 2012 12:37, Gwern Branwen
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 ]
Is the previous code right? I'm seeing an only single quote. Overall, I don't understand the example... what it has to do the first line with the last one? I'm sorry, I'm just starting to learn haskell to configure my xmonad.hs.
On Sun, May 13, 2012 at 12:33 PM, Pablo Olmos de Aguilera C.
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 :(
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/
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
-- gwern http://www.gwern.net
-- 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/