You are not logged in.

#1 2008-10-19 08:55:41

fuscia
Member
Registered: 2008-04-21
Posts: 398

can't get dmenu to work in dwm

i've read the applicable threads here on the subject. what seems to be missing is this bit, right here...

"exe=`dmenu_path | dmenu` && eval \"exec $exe\""

i got that from the xmonad configuration (the only tiling wm in which i can get dmenu to work). i can't figure out where to put it in the dwm config file. i know it needs to go somewhere in this mess...

/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }

/* commands */
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[]  = { "uxterm", NULL };

static Key keys[] = {
        /* modifier                     key        function        argument */
        { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },

...but, none of my wild guesses seem to work. i got close the last time in that i didn't get any errors when i did make, but it still wouldn't work. and btw, this is all pretty much total gibberish to me.

edit: i forgot to mention, doing in a terminal...

exe=`dmenu_path | dmenu ${1+"$@"}` && exec $exe

...while using dwm, brings up dmenu and it works.

Last edited by fuscia (2008-10-19 08:58:03)

Offline

#2 2008-10-19 09:12:09

TjPhysicist
Member
From: Waterloo, Canada
Registered: 2008-04-12
Posts: 126
Website

Re: can't get dmenu to work in dwm

then dmenu_run shd say exactly

exe=`dmenu_path | dmenu ${1+"$@"}` && exec $exe

mine does...

Last edited by TjPhysicist (2008-10-19 09:12:24)


-Tj
Now reborn as Tjh_ (to keep it similar to my username in other places)

Offline

#3 2008-10-19 10:07:12

fuscia
Member
Registered: 2008-04-21
Posts: 398

Re: can't get dmenu to work in dwm

TjPhysicist wrote:

then dmenu_run shd say exactly

exe=`dmenu_path | dmenu ${1+"$@"}` && exec $exe

mine does...

i don't understand. it should say that where?

Offline

#4 2008-10-19 12:14:20

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: can't get dmenu to work in dwm

you need to add dmenu_run script to /usr/bin with this

#!/bin/sh
exe=`dmenu_path | dmenu ${1+"$@"}` && exec $exe

or just update dmenu to 3.9 with ABS with this PKGBUILD (it contains the dmenu_run script)

# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
# Maintainer: Jeff 'codemac' Mickey <jeff@archlinux.org>

pkgname=dmenu
pkgver=3.9
pkgrel=1
pkgdesc="Dynamic X menu"
url="http://www.suckless.org/programs/dmenu.html"
arch=('i686' 'x86_64')
license=('MIT')
depends=('libx11')
source=(http://code.suckless.org/dl/tools/$pkgname-$pkgver.tar.gz 
        dmenu.patch)

build()
{
  cd $startdir/src/$pkgname-$pkgver
  patch -p1 < ../dmenu.patch
  make || return 1
  make DESTDIR=$startdir/pkg install

  #install license
  mkdir -p $startdir/pkg/usr/share/licenses/$pkgname
  cp LICENSE $startdir/pkg/usr/share/licenses/$pkgname/
}

md5sums=(''
         '067b6e08e48c535d7f3fdecd4d602700')
sha1sums=(''
          '')

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#5 2008-10-19 13:29:42

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: can't get dmenu to work in dwm

I'm not too familiar with the new config.h, but I think the SHCMD is what you want

{ MODKEY,                       XK_p,      spawn,          {SHCMD "exe=`dmenu_path | dmenu` && eval \"exec $exe\""} },

Offline

#6 2008-10-19 14:38:43

fuscia
Member
Registered: 2008-04-21
Posts: 398

Re: can't get dmenu to work in dwm

leo2501 wrote:

you need to add dmenu_run script to /usr/bin with this

#!/bin/sh
exe=`dmenu_path | dmenu ${1+"$@"}` && exec $exe

this seems like the simplest solution, though i don't know how to do it. i guessed that i need to put that in a text file called /usr/bin/dmenu.sh and make it executable? i tried it and it doesn't appear to work.

Offline

#7 2008-10-19 14:54:40

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: can't get dmenu to work in dwm

Oh God, just use xbindkeys and be done with it smile

Last edited by moljac024 (2008-10-19 14:54:48)


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#8 2008-10-19 14:58:26

fuscia
Member
Registered: 2008-04-21
Posts: 398

Re: can't get dmenu to work in dwm

moljac024 wrote:

Oh God, just use xbindkeys and be done with it smile

xbindkeys?

well, i got it to work. i had to change "dmenu_run" to "dmenu.sh" in config.h.  quite the production. thanks all for your help.

Offline

Board footer

Powered by FluxBB