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

wagnerdm at seas.upenn.edu wagnerdm at seas.upenn.edu
Fri Aug 7 00:51:39 EDT 2009


Dunno about your problem, but your script can be simplified:

#!/bin/sh
prompt=Liste
action=cd
if index=`ls -dU */ .*/ | dmenu -i -p "$prompt: $PWD"`; then
   $action $index && lsd; else
   actions
fi

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.)

Cheers,
~d


More information about the xmonad mailing list