[xmonad] Re: darcs patch: Shell.hs: +getBrowser, getEditor, helper... (and 5 more)

gwern0 at gmail.com gwern0 at gmail.com
Tue Apr 1 13:46:35 EDT 2008

On 2008.04.01 07:13:17 -0600, Justin Bogner <mail at justinbogner.com> scribbled 1.8K characters:
> gwern0-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org wrote:
>> Mon Mar 31 21:34:47 EDT 2008
>> gwern0-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
>>   * Shell.hs: +getBrowser, getEditor, helper function
>>   The helper function asks the shell for the value of a variable, else
>> returns the second argument.
>>   getBrowser and getEditor obviously specialize it for two particular
>> possibly queries
>> Mon Mar 31 21:39:47 EDT 2008
>> gwern0-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
>>   * Search.hs: remove an argument from selectSearch and promptSearch
>>   The new getBrowser function allows us to mv the old selectSearch and
>> promptSearch aside as too-general functions, and replace them with new
>> versions, which employ getBrowser to supply one more argument. This allows
>> us to replace the tedious 'selectSearch google "firefox"; selectSearch
>> yahoo "firefox"...' with shorter 'selectSearch google' and so on. One less
>> argument.
>>     Also, update the docs.
>> Mon Mar 31 21:50:49 EDT 2008
>> gwern0-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
>>   * RunOrRaise.hs: FF 3 doesn't use the "Firefox-bin" classname
>> Mon Mar 31 22:17:40 EDT 2008
>> gwern0-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
>>   * WindowGo.hs: +raiseBrowser, raiseEditor
>>   Specialize runOrRaise in the same way as with Actions.Search, for one's
>> browser and one's editors.
>> Mon Mar 31 22:20:12 EDT 2008
>> gwern0-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
>>   * forgot a haddock for getEditor in Shell.hs
>> Mon Mar 31 22:31:30 EDT 2008
>> gwern0-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
>>   * improve WindowGo.hs Haddock formatting
> As for the changes to RunOrRaise, firefox 3 actually works without
> resorting to classname (the pid thing works). I was just wary about
> changing it since firefox 3's not out yet, and that doesn't work with older
> firefoxes
> _____
> Justin Bogner

I dunno what the pid thing is; classes are kind of fragile, so I'm interested in a better way (though I believe that by title and class is how all the other wms implement run-or-raise).

But are you sure my change doesn't work with older Firefoxes? From reading the docs, I had understand that 'className =? "Firefox-bin"     <||> className =? "Firefox"' should work, as it will match any windows that use either the new Firefox 3 classname of 'Firefox', or an older firefox using 'Firefox-bin' as a class.

(Admittedly, I did not test the or'ing with both a new and old Firefox, but I used to use the first matcher and it worked fine, and I use the new matcher now, and it works fine; so the disjunction should follow AFAIK.)

explosion dog SASP PPP Sears passwd fulminate Choe WINGS Golani
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20080401/2abad764/attachment.bin

More information about the xmonad mailing list