[Xmonad] ShellPrompt completion like dmenus

Gwern Branwen gwern0 at gmail.com
Thu Sep 20 14:19:51 EDT 2007

On 2007.09.20 16:48:55 +0200, Andrea Rossato <mailing_list at istitutocolli.org> scribbled 12 lines:
> On Thu, Sep 20, 2007 at 04:06:10PM +0200, lobzang at free.fr wrote:
> > I would add also the following :
> >
> > could it be possible to have shift-tab to go to the previous entry ?
> >
> > thanks !
> This is on my TODO list, together with the other editing commands
> (ctrl-a/e, kill word, etc)... It takes some time. Any help highly
> appreciated though...;-)
> Andrea

This isn't entirely related, but since people are discussing ShellPrompt... before I switched to ShellPrompt from dmenu, I had this line:
 prompt :: String -> X ()
 prompt app = spawn (app ++ " `echo " ++ app ++ " | dmenu -fn '9x15bold,xft:Bitstream Vera Sans Mono' -nb black -nf white -sf green -sb black`")

It would prompt you for a string and then run the 'app' with that string through use of the pipe; pretty nifty. This was incredibly handy for working with Surfraw's elvi (shell scripts that would open up specified web pages/web searches). I eventually figured I could replace it with:

 prompt :: String -> X ()
 prompt c = mkXPrompt Shell greenXPConfig getShellCompl foo
  		          where foo a = spawn (c ++ " " ++ a)

But this strikes me as inelegant. Is there any better way, do you think/.

Bragg CISE Security Glock submiss Reprieve SEAL beanpole charges nuclear
-------------- 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/20070920/8b085781/attachment.bin

More information about the Xmonad mailing list