| Author |
Message |
aragon
Joined: 15 Oct 2007 Posts: 1690 Location: Germany
|
Posted: Mon 05 Oct 2009, 13:16 Post subject:
Dmenu (advanced) - Dynamic Menu System |
|
Home: http://tools.suckless.org/dmenu
Version: 4.0
| Quote: | | dynamic menu is a generic menu for X, originally designed for dwm. It manages huge amounts (up to 10,000 and more) of user defined menu items efficiently. |
Dmenu parses your apps-path and presents the found applications as a menu. Downside is, that it launches (by default) every app directly, so if you got a cli-app, it will be launched, but somewhere out there, not visible.
So i've added two alternative starter (dmenu_run is the std)
1. dmenu_termrun: runs everything in a rxvt-window
2. dmenu_roxrun: gives you a menu with all *.desktop-files in /usr/share/applications and /usr/local/share/application
To use dmenu, you should add keyboard-shortcuts to your wm-config.As an example you could add the following to your /root/.jwm/jwmrc_personal
| Code: | <Key mask="C" key="F5">exec:dmenu_roxrun</Key>
<Key mask="C" key="F6">exec:dmenu_run</Key>
<Key mask="C" key="F7">exec:dmenu_termrun</Key> |
To use dmenu_roxrun, you will first have to run /root/Startup/00_dmenudeskupdate. This script will later run on every startup to build/renew the symlinks that the dmenu_roxrun-script is based on.
usage is simple: you launch dmenu and type in some characters of the application, you're looking for (or simple browse the list with the left/right button). to launch the (found) app, simply press return.
It's not that clear (i know black on black...), dmenu is the upper bar and my input was screen and roxrun found the shown apps.
EDIT 2009-11-11: Due to some posts in this thread, i've searched for some patches for dmenu (thanks to jemimah and amigo).
I was able to apply xft, vertical, history and dockapp patches.
Used patches:
1. vertical+xft: http://aur.archlinux.org/packages.php?ID=27334
2. history (applied by hand): http://www.murga-linux.com/puppy/viewtopic.php?p=349070#349070
3. dockapp (applied by hand): http://www.murga-linux.com/puppy/viewtopic.php?p=349070#349070
You'll now find attached the patched source, a diff (orig. source to full patched version) and an additional pet with the new 'dmenu-base'.
Settings are (nearly) the same as before. You'll find a help-file at /usr/share/doc (also containing the new abilities). If you want to change the settings, you'll have to modify the starter-apps
| Code: | /usr/bin/dmenu_run
/usr/bin/dmenu_roxrun
/usr/bin/dmenu_termrun |
aragon
| Description |
all patches in seperate patch-files
|

Download |
| Filename |
dmenu-4.0-vxhd-patches_seperate.tar.gz |
| Filesize |
8.36 KB |
| Downloaded |
271 Time(s) |
| Description |
|

Download |
| Filename |
dmenu-vxhd-4.0.pet |
| Filesize |
12.83 KB |
| Downloaded |
264 Time(s) |
| Description |
all patches in one patch file
|

Download |
| Filename |
dmenu-4.0-vxhd.patch.gz |
| Filesize |
7.76 KB |
| Downloaded |
219 Time(s) |
| Description |
|

Download |
| Filename |
dmenu-vxhd-src-4.0.tar.gz |
| Filesize |
11.32 KB |
| Downloaded |
224 Time(s) |
| Description |
|
| Filesize |
30.16 KB |
| Viewed |
2397 Time(s) |

|
| Description |
contains the standard-dmenu
|

Download |
| Filename |
dmenu-advanced-4.0.pet |
| Filesize |
9.43 KB |
| Downloaded |
308 Time(s) |
_________________ PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Last edited by aragon on Fri 13 Nov 2009, 11:15; edited 4 times in total
|
|
Back to top
|
|
 |
trapster

Joined: 28 Nov 2005 Posts: 1966 Location: Maine, USA
|
Posted: Mon 05 Oct 2009, 17:29 Post subject:
|
|
Good timing with this. I've been playing with dwm for the past week.
But...
| Code: | 05:18 PM ~ # dmenu_run
/usr/bin/dmenu_path: line 17: cd: /root/bin: No such file or directory |
Ok, seems I onlt got that message the first run.
Seems good now, app starts when chosen but then the menu dies.
_________________ trapster
Maine, USA
Asus eeepc 1005HA PU1X-BK
Frugal install:Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Puppeee-1.0 AND lupu52 w/ fluxbox
|
|
Back to top
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: Mon 05 Oct 2009, 17:45 Post subject:
|
|
You can also try the vertical version of dmenu.
http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=21817
Discussion is here: http://www.murga-linux.com/puppy/viewtopic.php?t=39411
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 836
|
Posted: Mon 05 Oct 2009, 18:38 Post subject:
|
|
aragon,
Thanks for posting this. I played around with Dmenu a bit and was going to post a pet at some point and didn't get around to it - (I got sidetracked trying to get Launchy to work on puppy)
Anyway, your implementation is much better by using links to .desktop files. Nice idea.
There are many ways to use Dmenu other than running programs. As a file selector for other programs you can do this | Code: | #!/bin/bash
DIR=whateverdirhasfiles
DMENU_ARGS="-b"
FILE=`ls $DIR | /usr/bin/dmenu ${DMENU_ARGS}`
if [ -f ${DIR}/${FILE} ]; then
DO SOMETHING HERE WITH THE SELECTED $FILE
fi
|
trapster,
Yes, the cache has to be filled before it works and I think that Dmenu leaves by default.
How do you like DWM? I tried it and liked it but for some reason it doesn't keep me there.
jemimah,
That's an interesting discussion on WM's. I'll definitely have to try out that one.
Cheers,
s
|
|
Back to top
|
|
 |
aragon
Joined: 15 Oct 2007 Posts: 1690 Location: Germany
|
Posted: Tue 06 Oct 2009, 02:58 Post subject:
|
|
@trapster
i think this just happens if a path in PATH does not exist. but it's uncritical.
and yes dmenu 'dies' after command execution, what is positive in my opinion.
@jemimah
will look at the vertical later. thanks for the link.
@seaside
yes, dmenu is kind of swiss army knife for opening/starting things. i do like it very much. i've posted a kind of 'base-version'. i'm also using the awesome-windowmanager that has dmenu 'inbuild'. there i use the functionality to also have a Favourites-Menu and a Places-Menu.
I think you could realize everything for what you have a list (with cat) or a folder (with ls) and for that you are able to define a starter.
aragon
_________________ PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
|
|
Back to top
|
|
 |
ragaman
Joined: 14 Jan 2007 Posts: 186
|
Posted: Tue 06 Oct 2009, 04:22 Post subject:
|
|
Does this work the same way as GNOME-DO? If so, thanks a million. I've been waiting for a Puppy version (light) of the said utility.
|
|
Back to top
|
|
 |
trapster

Joined: 28 Nov 2005 Posts: 1966 Location: Maine, USA
|
Posted: Tue 06 Oct 2009, 06:45 Post subject:
|
|
Is there any way to keep it running after a selection is made?
I have been using MU's GtkBasic-Panel which is nice because you can minimize it when it gets in the way.
_________________ trapster
Maine, USA
Asus eeepc 1005HA PU1X-BK
Frugal install:Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Puppeee-1.0 AND lupu52 w/ fluxbox
|
|
Back to top
|
|
 |
aragon
Joined: 15 Oct 2007 Posts: 1690 Location: Germany
|
Posted: Tue 06 Oct 2009, 07:32 Post subject:
|
|
@ragaman
on a very basic-level: yes i think so... but i think with gnome-do you could also search in dokuments and such things. you might be able to do something similar with dmenu, but this is not implemented in my package.
@trapster
| Quote: | | Is there any way to keep it running after a selection is made? |
not that i know. but allow me a counterquestion: what would be the benefit? it's not running if you don't need it and if you need it, you launch it with a shortcut. as i see it, you won't have it quicker or simpler 'present' if it would run all the time?
please give me the missing link
aragon
_________________ PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
|
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 1759
|
Posted: Tue 06 Oct 2009, 07:33 Post subject:
|
|
There's a patch which adds support for Xft (anti-aliased fonts) here:
http://www.rootshell.be/~polachok/code/dmenu-3.4-xft.diff
Somewhere I have some other patches for it, but I can't find them right now. They come from deli linux which uses dmenu extensively.
|
|
Back to top
|
|
 |
aragon
Joined: 15 Oct 2007 Posts: 1690 Location: Germany
|
Posted: Tue 06 Oct 2009, 10:44 Post subject:
|
|
@amigo
found some different xft-patches for dmenu-4.0
http://aur.archlinux.org/packages.php?ID=28745&detail=1
http://lists.suckless.org/dwm/0905/8236.html
and will try to add one of them.
there are some other in aur for vertical and history? will look at them also.
aragon
_________________ PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
|
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 1759
|
Posted: Tue 06 Oct 2009, 12:39 Post subject:
|
|
Ah yes, thanks for the tip -I found lots of goodies there (starting)on aur -even a dmenu-based file-manager.
dmenu is alos in debian, so I am looking at that to see if there are any critical patches.
|
|
Back to top
|
|
 |
aragon
Joined: 15 Oct 2007 Posts: 1690 Location: Germany
|
Posted: Thu 08 Oct 2009, 06:08 Post subject:
|
|
The first post now also has a package with a patched dmenu (amongst others vertical usage).
@ amigo
i've tried to patch with the vertical-patch AND the xft-patch, but that gave errors, so i decided to only use the vertical as this seems to be more 'usefull' to me.
but one question: is there a way to merge patches (to not have to do it by hand)?
| Quote: | | even a dmenu-based file-manager |
i've just tested dmenfm, it works but to me it looks more like a gimmick (i hope the arch-guys will forgive me...)
aragon
_________________ PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
|
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 1759
|
Posted: Thu 08 Oct 2009, 11:17 Post subject:
|
|
"is there a way to merge patches (to not have to do it by hand)?" -Actually, some Revision Control Systems can do this, but I always work them out by hand -one at a time. It's a good way to go along reading lots of code, in order to understand lots -I mean more code...
But, I've saved you a bit of work by working out these:
dmenu-xft.diff
dmenu-xft-add-vertical.diff
dmenu-xft-vertical-add-history.diff
dmenu-4.0-DockApp.diff
Apply them in that order. There's a couple of more that I'm eyeing, but I'm busy creating patch sets for WindowMaker for over 65 bug-fixes. I'm creating a canonical tree for posterity since the original maintainers have quit and the new maintainer won't do anything. I've still got a few bug fix patches to 're-diff' and then I move onto the added feature patches for a more adventurous branch. I'm too old to set down and study code by the hour -but I can while away lots of time and still learn a little by working this way.
The dockapp patch may not do anything, depending on what WM you use. There are several version of the vertical patch(es) which mix/match the opitions available. When I get around to it, I'll get them all together and re-order them so it looks better. There's also a couple of forks or replacements on AUR - fmenu and awmenu which is a gtk runbox -I guess with dmenu guts.
 |
| Description |
|

Download |
| Filename |
dmenu-4.0-DockApp.diff.gz |
| Filesize |
329 Bytes |
| Downloaded |
240 Time(s) |
| Description |
|

Download |
| Filename |
dmenu-xft-vertical-add-history.diff.gz |
| Filesize |
1.55 KB |
| Downloaded |
245 Time(s) |
| Description |
|

Download |
| Filename |
dmenu-xft-add-vertical.diff.gz |
| Filesize |
2.19 KB |
| Downloaded |
234 Time(s) |
| Description |
|

Download |
| Filename |
dmenu-4.0-xft.diff.gz |
| Filesize |
2.46 KB |
| Downloaded |
262 Time(s) |
|
|
Back to top
|
|
 |
aragon
Joined: 15 Oct 2007 Posts: 1690 Location: Germany
|
Posted: Thu 08 Oct 2009, 11:59 Post subject:
|
|
amigo,
all i can say is whow! will go through the patches soon.
yes there are some forks fmenu for instance is just dmenu-4.0 with a vertical patch applied.
i greatly appreciate your work. i'm not competent in diff and patch.
thanks aragon
p.s. good luck with your windowmaker-project.
_________________ PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
|
|
Back to top
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: Thu 15 Oct 2009, 16:10 Post subject:
|
|
So I had a brilliant idea yesterday. Wouldn't it be sweet if Dmenu could show application icons like Launchy and Gnome-Do? Well a streak of genius hit me and now it can! Well sort of...
Here's what you do: first modify dmenu so that instead of just returning a value when you hit enter, make it return a value every time the selection changes. Then pipe said output through a shell script that figures out which icon to use. Then you can use a program called xteddy to display a nifty shaped icon in the middle of the screen. When the selection changes, kill the old xteddy and open a new one with the new icon.
The only bummer is that most of the icons on puppy are a tiny size. I want to release this launcher with when I release Fluppy, but replacing all the tiny ugly icons is a daunting task.
| Description |
|

Download |
| Filename |
dmenu-icons.jpg |
| Filesize |
65.03 KB |
| Downloaded |
335 Time(s) |
|
|
Back to top
|
|
 |
|