You are not logged in.

#1 2008-01-20 01:00:51

dax965
Member
Registered: 2007-09-09
Posts: 35

[solved] dmenu

How do I get dmenu working?  I use Xfce.  I run "dmenu" in terminal, but when I press ALT+P, nothing pops up. I love this program and I need it.

Is there any similar alternatives?  (I'd much rather use dmenu)

Last edited by dax965 (2008-01-20 19:15:50)

Offline

#2 2008-01-20 03:11:31

SilentM
Member
Registered: 2007-10-21
Posts: 25

Re: [solved] dmenu

You'll have to bind "ALT+P" to run "dmenu," as dmenu itself doesn't do any keybinding.

Offline

#3 2008-01-20 04:14:24

dax965
Member
Registered: 2007-09-09
Posts: 35

Re: [solved] dmenu

Thanks!  But now I have a new problem.  I start typing, but it doesn't auto-complete / auto-search. Even when I type in a full name of a program (eg 'xterm') and hit enter, it doesn't do anything.  Anyone know why?

Offline

#4 2008-01-20 04:20:59

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: [solved] dmenu

dmenu is a bit more flexible than that: you pipe it arbitrary stuff, you then select one name, then it returns the name of the thing you selected.

So, to get that functionality, you need to make a shell script containing one of the following examples, or maybe the xfce keybinding settings allow you to just input the whole line:

exe=`dmenu_path | dmenu` && eval "exec $exe"
exe=`dmenu < myLinefeedDelimitedListOfFaves` && eval "exec $exe"

Last edited by vogt (2008-01-20 04:25:05)

Offline

#5 2008-01-20 19:15:40

dax965
Member
Registered: 2007-09-09
Posts: 35

Re: [solved] dmenu

vogt wrote:

dmenu is a bit more flexible than that: you pipe it arbitrary stuff, you then select one name, then it returns the name of the thing you selected.

So, to get that functionality, you need to make a shell script containing one of the following examples, or maybe the xfce keybinding settings allow you to just input the whole line:

exe=`dmenu_path | dmenu` && eval "exec $exe"
exe=`dmenu < myLinefeedDelimitedListOfFaves` && eval "exec $exe"

Worked!  Thank you so much.

Offline

#6 2008-01-20 20:38:06

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [solved] dmenu

Ah! I missed that eval "exec $exe", that's why it didn't work for me. What does that do precisely? Does it make the whole string execute? And why is not the string exectuting without eval?


Have you Syued today?
Free music for free people! | Earthlings

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

Offline

#7 2008-01-21 05:31:46

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: [solved] dmenu

finferflu wrote:

Ah! I missed that eval "exec $exe", that's why it didn't work for me. What does that do precisely? Does it make the whole string execute? And why is not the string exectuting without eval?

exe=`dmenu < myLinefeedDelimitedListOfFaves` && eval "exec $exe"

Step by step:
1: you dmenu sees you list of programs to run (via shell redirection something)
2: you select it
3: dmenu returns the name of the thing you chose
4: && means only continue if dmenu exited with status 0 (you didn't press escape)
5: I think that the eval is unnecessary, but it doesn't hurt. exec replaces the current shell.

Bleh. I hope that helped. You'd be better off learning shell scripting somewhere else...

Offline

#8 2008-01-21 12:50:20

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: [solved] dmenu

vogt wrote:
finferflu wrote:

Ah! I missed that eval "exec $exe", that's why it didn't work for me. What does that do precisely? Does it make the whole string execute? And why is not the string exectuting without eval?

exe=`dmenu < myLinefeedDelimitedListOfFaves` && eval "exec $exe"

Step by step:
1: you dmenu sees you list of programs to run (via shell redirection something)
2: you select it
3: dmenu returns the name of the thing you chose
4: && means only continue if dmenu exited with status 0 (you didn't press escape)
5: I think that the eval is unnecessary, but it doesn't hurt. exec replaces the current shell.

Bleh. I hope that helped. You'd be better off learning shell scripting somewhere else...

eval lets you pass arguments eg. mirage ~/file.png


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

Board footer

Powered by FluxBB