[xmonad] would it be easy to make xmonad.prompt.directory call itself on sucess?

jean bonhomme jeanbonh at ymail.com
Fri Aug 7 05:48:22 EDT 2009


--- En date de : Ven 7.8.09, wagnerdm at seas.upenn.edu <wagnerdm at seas.upenn.edu> a écrit :Dunno about your problem, but your script can be simplified:
#!/bin/shprompt=Listeaction=cdif index=`ls -dU */ .*/ | dmenu -i -p "$prompt: $PWD"`; then  $action $index && lsd; else  actionsfi
dmenu itself fails if you hit escape; it only succeeds if you actually choose something, so it can be used in the if clause directly.  (I know this because I have a bug in yeganesh that violates this useful behavior.  If I ever get around to making another release, it will have a fix for this. =)
As for autocompletion... doesn't dmenu have that built in?
  (Try hitting tab, or left and right when there are multiple completions.)
Hello, thanks for your reply,My script can surely be simplified as i'm still informaticly young :)but when i try your proposal in a xterm, I have : "line 5 : command not found"so at the moment i keep my version until i've found what's the trouble. 
I already use escape, to go to the "else" part of my script,that is to say the script named "actions" which goal is similar to your yeganesh,It is as "lsd", a simple script.ls parse a folder with only symbolic linksto my most used programs and scriptsand pipes to dmenu.
For the autocompletion, I meant the one which can be used in XMonad,for example with : { autoComplete = Just 100000 } in the ~/.xmonad/xmonad.hswith which, when only one
 result from the list is still matching, the actionis automaticly executed.
I've paste this script only to explain what I meant in my first message,which is more xmonad related : 
When I use the XMonad.Prompt.Directoryto dive in subdirectories, how could it calls itself until I send an Escape message,It might be a single haskell line in the XMonad/Prompt/Directory.hs filefrom the xmonad-contrib source but I've no clue :(



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/xmonad/attachments/20090807/e59e05c6/attachment-0001.html


More information about the xmonad mailing list