new contrib modules in XMonad.Prompt

Hi all, I just pushed a few new contrib modules and wanted to highlight them here in case anyone might find them useful, or think of something interesting to do with them. Basically, I just discovered the excellent XMonad.Promptframework and have been playing around with it. * The first is XMonad.Prompt.AppendFile, which simply provides a prompt for you to type a single line of text which should be appended to a file. I use it for quickly writing down notes/reminders/todos that pop into my head into a special file, when I don't want to interrupt whatever else I'm doing. You could also use it for, say, writing a new xmonad contrib module line-by-line, although I don't recommend it. =) * The next is (IMO) the most interesting, XMonad.Prompt.Input. It provides a nice, modular way to build actions which require user input, using the existing prompt system to get the user input. I also refactored XMonad.Prompt a bit to make this possible. * XMonad.Prompt.Email is a simple example of the sort of thing that's possible with XMonad.Prompt.Input; it prompts the user for a recipient, a subject, and a short (one-line) body, and sends an e-mail via the GNU 'mail' utility. Comments, suggestions, and (especially) patches welcome! -Brent

On 11/28/07, Brent Yorgey
I just pushed a few new contrib modules and wanted to highlight them here in case anyone might find them useful, or think of something interesting to do with them. Basically, I just discovered the excellent XMonad.Prompt framework and have been playing around with it.
* The first is XMonad.Prompt.AppendFile, which simply provides a prompt for you to type a single line of text which should be appended to a file. I use it for quickly writing down notes/reminders/todos that pop into my head into a special file, when I don't want to interrupt whatever else I'm doing. You could also use it for, say, writing a new xmonad contrib module line-by-line, although I don't recommend it. =)
Wow. Don't you think `shellPrompt' from XMonad.Prompt.Shell is quite suitable? It's flexible, it's general, it's... shell. Run: echo 'http://en.wikipedia.org/wiki/Featuritis' >>/home/me/NOTES
* The next is (IMO) the most interesting, XMonad.Prompt.Input. It provides a nice, modular way to build actions which require user input, using the existing prompt system to get the user input. I also refactored XMonad.Prompt a bit to make this possible.
* XMonad.Prompt.Email is a simple example of the sort of thing that's possible with XMonad.Prompt.Input; it prompts the user for a recipient, a subject, and a short (one-line) body, and sends an e-mail via the GNU 'mail' utility.
Comments, suggestions, and (especially) patches welcome!
Yes, these look useful. I haven't read them properly, though: I've updated GHC to the latest darcs version and can't even configure xmonad now. :) But your patches might simplify extending XMonad.Prompt.Man: section-wise manpage completions aren't easy while `getCompletions' (from XMonad.Prompt) ignores all words in prompt except the last one. Thank you! -- vvv

* The first is XMonad.Prompt.AppendFile, which simply provides a prompt for you to type a single line of text which should be appended to a file. I use it for quickly writing down notes/reminders/todos that pop into my head into a special file, when I don't want to interrupt whatever else I'm doing. You could also use it for, say, writing a new xmonad contrib module line-by-line, although I don't recommend it. =)
Wow. Don't you think `shellPrompt' from XMonad.Prompt.Shell is quite suitable? It's flexible, it's general, it's... shell. Run: echo 'http://en.wikipedia.org/wiki/Featuritis' >>/home/me/NOTES
That's obviously not the same thing. When I want to quickly write down a todo item, I don't want to have to type 'echo' and '>>/home/me/NOTES' every time. The point is to be able to hit: keybinding, todo item, enter. Anything more than that defeats the purpose. And no one said you have to use this extension. =) With that said, however, this is obviously a very simple extension, and perhaps it doesn't really deserve its own module. Suggestions for merging it into another module are welcome. Perhaps we could create a single module with lots of 'trivial' prompts of this sort, partly to be useful and partly to give people an idea of the sorts of things that are possible to code on their own. In the end, that's really a big part of why I contributed this extension: to give people a simple example of the sort of thing that is possible. Yes, these look useful. I haven't read them properly, though: I've updated
GHC to the latest darcs version and can't even configure xmonad now. :) But your patches might simplify extending XMonad.Prompt.Man: section-wise manpage completions aren't easy while `getCompletions' (from XMonad.Prompt) ignores all words in prompt except the last one.
Yikes, I hope you can get GHC + xmonad working properly! At any rate I'll look forward to seeing what you do with the man prompt, it's one of the ones I use now. -Brent

On 11/29/07, Brent Yorgey
That's obviously not the same thing. When I want to quickly write down a todo item, I don't want to have to type 'echo' and '>>/home/me/NOTES' every time. The point is to be able to hit: keybinding, todo item, enter. Anything more than that defeats the purpose. And no one said you have to use this extension. =)
But you still use tty or a text editor to read them, don't you?.. Well, there are many ways to interact with computer, and who am I to judge your preferences, especially after they've intrigued me so much. ;)
Yikes, I hope you can get GHC + xmonad working properly! At any rate I'll look forward to seeing what you do with the man prompt, it's one of the ones I use now.
Thank you. And I'm very glad to know that `manPrompt' has its users. Have fun! -- vvv
participants (2)
-
Brent Yorgey
-
Valery V. Vorotyntsev