You are not logged in.
Pages: 1
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
You'll have to bind "ALT+P" to run "dmenu," as dmenu itself doesn't do any keybinding.
Offline
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
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
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
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
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
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
Pages: 1