I label the dmenu entries, then I write a oneliner for each
from my config.h (bound to a keyboard shortcut)
exec /home/wyrmskull/scripts/dmenu.sh
from ~/scripts/dmenu.sh
#!/bin/bash
RESULT=$( cat /home/wyrmskull/scripts/.dmenu | dmenu )
case "$RESULT" in
"appwithargs" ) exec app with args and whatever;;
[...]
esac
from ~/scripts/.dmenu
firefox
[...]
Wyrm
Xavier wrote:
> In config.arg.h and config.default.h , dmenu is run like this :
> exe=`dmenu_path | dmenu` && exec $exe
>
> This doesn't work for commands with arguments, eg "xterm -e top" or "import
> -w root root.png" or whatever.
>
> But running dmenu like this works fine (thanks to rob__ on #dwm for that hint ;) :
> exe=`dmenu_path | dmenu` && eval "exec $exe"
>
> Does it have any downsides? If not, maybe it could be done in both config.h examples.
>
>
>
Received on Thu Sep 13 2007 - 21:52:36 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:52:48 UTC