Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 23 Oct 2014, 02:19
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Dmenu (advanced) - Dynamic Menu System
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [40 Posts]   Goto page: 1, 2, 3 Next
Author Message
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: 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
dmenu-4.0-vxhd-patches_seperate.tar.gz
Description  all patches in seperate patch-files
gz

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

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

 Download 
Filename  dmenu-4.0-vxhd.patch.gz 
Filesize  7.76 KB 
Downloaded  274 Time(s) 
dmenu-vxhd-src-4.0.tar.gz
Description 
gz

 Download 
Filename  dmenu-vxhd-src-4.0.tar.gz 
Filesize  11.32 KB 
Downloaded  280 Time(s) 
dmenu.png
 Description   
 Filesize   30.16 KB
 Viewed   3414 Time(s)

dmenu.png

dmenu-advanced-4.0.pet
Description  contains the standard-dmenu
pet

 Download 
Filename  dmenu-advanced-4.0.pet 
Filesize  9.43 KB 
Downloaded  376 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
View user's profile Send private message 
trapster


Joined: 28 Nov 2005
Posts: 2006
Location: Maine, USA

PostPosted: 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 Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send private message Visit poster's website 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: 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
View user's profile Send private message Visit poster's website 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: 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) Very Happy

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. Very Happy

jemimah,

That's an interesting discussion on WM's. I'll definitely have to try out that one.

Cheers,
s
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: 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
View user's profile Send private message 
ragaman

Joined: 14 Jan 2007
Posts: 186

PostPosted: 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
View user's profile Send private message 
trapster


Joined: 28 Nov 2005
Posts: 2006
Location: Maine, USA

PostPosted: 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 Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send private message Visit poster's website 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: 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 Wink

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2258

PostPosted: 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
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: 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
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2258

PostPosted: 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
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: 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
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2258

PostPosted: 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.
dmenu-4.0-DockApp.diff.gz
Description 
gz

 Download 
Filename  dmenu-4.0-DockApp.diff.gz 
Filesize  329 Bytes 
Downloaded  297 Time(s) 
dmenu-xft-vertical-add-history.diff.gz
Description 
gz

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

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

 Download 
Filename  dmenu-4.0-xft.diff.gz 
Filesize  2.46 KB 
Downloaded  320 Time(s) 
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: 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
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: 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.
dmenu-icons.jpg
Description 
jpg

 Download 
Filename  dmenu-icons.jpg 
Filesize  65.03 KB 
Downloaded  413 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 3 [40 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0991s ][ Queries: 12 (0.0092s) ][ GZIP on ]