
22 Aug
2007
22 Aug
'07
11:24 a.m.
On Wednesday 22 August 2007 11:09:21 Gwern Branwen wrote:
Anyway, I don't think I'll send in a contrib module just yet. hxsel should probably be factored out into two functions, a main that prints stuff to stdout and the actual selection-fetching code; that way it doesn't have to be duplicated. Further, I'm having problems integrating it into Config.hs: I finally got it to compile like this: , ((modMask .|. shiftMask, xK_g ), spawn $ "google" ++ unsafePerformIO(getSelection))
Yikes! :) Here's one way to do it: do sel <- getSelection; spawn ("google" ++ sel) Pointfree: spawn ("google" ++) =<< getSelection Cheers, Spencer Janssen