Re: [dwm] I like Dmenu a little simpler

From: Joerg van den Hoff <j.van_den_hoff_AT_fzd.de>
Date: Sun, 9 Mar 2008 11:22:54 +0100

On Sat, Mar 08, 2008 at 10:35:46PM +0100, Henrik Holst wrote:
> > Date: Fri, 7 Mar 2008 16:40:22 +0100
> > From: Joerg van den Hoff <j.van_den_hoff_AT_fzd.de>
> > Subject: Re: [dwm] I like Dmenu a little simpler
> > To: dynamic window manager <dwm_AT_suckless.org>
> > Message-ID: <20080307154022.GC28274_AT_marco.fz-rossendorf.de>
> > Content-Type: text/plain; charset=us-ascii
> >
> > On Fri, Mar 07, 2008 at 01:11:33PM +0100, Szabolcs Nagy wrote:
> > > On 3/7/08, Joerg van den Hoff <j.van_den_hoff_AT_fzd.de> wrote:
> > > > I was expecting that the selected entry is fed to `exec' or
> > > > whatever. simple question: what is supposed to happen and
> > > > how do I use `dmenu' sensibly?
> > >
> > > have you edited dmenu_run? how do you call dmenu_run in dwm config.h?
> > >
> >
> > I'm mostly using 4.7 right now and there (contrary to what's
> > in the repository) is no `dmenu_run'. rather, `mod1-p' has
> > it's default binding, namely essentially (deleting the color
> > settings stuff):
> >
> > "exe=`dmenu_path | dmenu` && exec $exe"
> >
> > I confess guilty of not having looked at the source code
> > before posting, but it seems that the above actually should
> > do what I expected: (attempt to) execute the selection.
> > but, e.g., selecting `gv' and hitting return has no visible
> > consequences. using the above binding in a shell yields
> > correct behaviour, though.
> >
> > so I repeat my question: might the problem have to do with
> > the BUGS section of the `dwm' manpage (I seee this 'EOF'
> > at the r.h.s. of the statusbar)?
> >
> >
> > joerg
> >
> >
>
> Hi!
>
> I had the same problem with dwm 4.7 in Solaris.
>
> This solution works for me and is not so complex:
>
> { MODKEY, XK_p, spawn,
> "$SHELL -c `dmenu_path | dmenu -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"'"
> " -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"'`" },
>
> (Should work as good with zsh, bash and dash.)
>
> --
> Henrik Holst

thanks a lot. I've taken over this approach, but explicitely call "sh -c" in order
to enforce use of `sh' even if my interactive default shell is something different
(tcsh in my case). it works now...

I would think a similar modification should be done "upstream": enforcing
`sh' explicitly seems much better than assuming everybody has set SHELL to `sh'.

joerg
>
Received on Sun Mar 09 2008 - 11:22:55 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:25:05 UTC