
I have wanted, for a long while, to revisit XMonad.Prompt and make it use the main event hook, rather than its own sneaky manipulation down in IO land. I've started working on it as I consider the current behavior a bit of a wart, but it will mean the loss of mkXPromptWithReturn and the making-asynchronous of mkXPrompt. (i.e. The String -> X () argument will be invoked after the function has returned.) In looking through XMonadContrib, it looks like most users of XMonad.Prompt would be OK with this; xmonad-extras' XMonad.Prompt.Eval and XMonad.Prompt.MPD would need to be rewritten (which I can do, I think) and so I wonder if other users would notice the shift? If there's not overwhelming objection, I'll get a patch out soon for people to review. Thanks in advance. --nwf;

On Tue, Nov 15, 2011 at 3:22 PM, Nathaniel Filardo
I have wanted, for a long while, to revisit XMonad.Prompt and make it use the main event hook, rather than its own sneaky manipulation down in IO land. I've started working on it as I consider the current behavior a bit of a wart, but it will mean the loss of mkXPromptWithReturn and the making-asynchronous of mkXPrompt. (i.e. The String -> X () argument will be invoked after the function has returned.) In looking through XMonadContrib, it looks like most users of XMonad.Prompt would be OK with this; xmonad-extras' XMonad.Prompt.Eval and XMonad.Prompt.MPD would need to be rewritten (which I can do, I think) and so I wonder if other users would notice the shift? If there's not overwhelming objection, I'll get a patch out soon for people to review.
Looking through the config archive, I don't see any users of that function. So as long as you don't break anything in XMC you don't fix, there probably wouldn't be any problems. Aside from that, I conclude that XMonad 1.0 must be released. -- gwern http://www.gwern.net

Well, I took a stab at it, but it's broken. :( If somebody could look
at http://www.acm.jhu.edu/~nwf/prompt-core.dpatch (the (small) set of
changes needed to xmonad core) and
http://www.acm.jhu.edu/~nwf/prompt-contrib.dpatch, I'd be grateful.
Note that to run the code, you'll have to add
XMonad.Prompt.eventHandle to your eventHook in xmonad's configuration
and that I haven't patched xmonad-extras yet.
Thanks.
--nwf;
On Tue, Nov 15, 2011 at 3:22 PM, Nathaniel Filardo
I have wanted, for a long while, to revisit XMonad.Prompt and make it use the main event hook, rather than its own sneaky manipulation down in IO land. I've started working on it as I consider the current behavior a bit of a wart, but it will mean the loss of mkXPromptWithReturn and the making-asynchronous of mkXPrompt. (i.e. The String -> X () argument will be invoked after the function has returned.) In looking through XMonadContrib, it looks like most users of XMonad.Prompt would be OK with this; xmonad-extras' XMonad.Prompt.Eval and XMonad.Prompt.MPD would need to be rewritten (which I can do, I think) and so I wonder if other users would notice the shift? If there's not overwhelming objection, I'll get a patch out soon for people to review.
Thanks in advance. --nwf;

Nathaniel Filardo wrote:
Well, I took a stab at it, but it's broken. :( If somebody could look at http://www.acm.jhu.edu/~nwf/prompt-core.dpatch (the (small) set of changes needed to xmonad core) and http://www.acm.jhu.edu/~nwf/prompt-contrib.dpatch, I'd be grateful.
Note that to run the code, you'll have to add XMonad.Prompt.eventHandle to your eventHook in xmonad's configuration and that I haven't patched xmonad-extras yet.
I haven't tested it, but do you really need to pass the Ptr XEvent to all event hooks? Wouldn't it be possible to simply convert the Event into an XEvent? Changing the type of the event hook is likely to break a lot of configs.

On Wed, Nov 16, 2011 at 11:40, Audun Skaugen
Nathaniel Filardo wrote:
Well, I took a stab at it, but it's broken. :( If somebody could look at http://www.acm.jhu.edu/~nwf/**prompt-core.dpatchhttp://www.acm.jhu.edu/~nwf/prompt-core.dpatch(the (small) set of changes needed to xmonad core) and http://www.acm.jhu.edu/~nwf/**prompt-contrib.dpatchhttp://www.acm.jhu.edu/~nwf/prompt-contrib.dpatch, I'd be grateful.
Note that to run the code, you'll have to add XMonad.Prompt.eventHandle to your eventHook in xmonad's configuration and that I haven't patched xmonad-extras yet.
I haven't tested it, but do you really need to pass the Ptr XEvent to all event hooks? Wouldn't it be possible to simply convert the Event into an XEvent?
Changing the type of the event hook is likely to break a lot of configs.
There's a fair amount of breakage in the event stuff, starting with the event definitions in the X11 Haskell bindings. :/ -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
participants (4)
-
Audun Skaugen
-
Brandon Allbery
-
Gwern Branwen
-
Nathaniel Filardo