In search of consistent menu generation

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#16 Post by rarsa »

rarsa wrote:
5. Dynamic menu refresh program for Window Managers


Not needed for the main WM's as I said. It IS implemented for the most important one's, we just have to activate it. That is the winning point for me.
Great! one done, a few more to go!
Quite unlikely they exist (all I know are WM-specific).
Wrong! That's the beauty of using standards. There are a few, There is one in particular that seems to be favored by the major distros xdg-menu.

So maybe two done? two less to go?

Woow, we are fast!... No, not so... xdg-menu is a perl script, so we may have to either translate it to puppyfy it or just take the best ideas and start from scratch, or look for another one. (that's the kind of investigation I was talking about)
If you are ready to go, I will not block you. But before you start developing, we should fix the specs.
When I said I'll start right away I meant of course writing the wish list. Once we prioritize the wish list we can actually have the specs for each one as we require them.

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#17 Post by jcoder24 »

My idea for a solution is to use the fvwm95 or jwm menu as a template and have a script that parses the 'template menu' to generate the other wm menus. This script would also be able to add and delete menus for any of the wm it supports. This script can be a combination awk/sh script which should help to keep it small.

When we want to add a support for a new wm, we would add a template for that wm to the 'wm_menu' script which would 'teach' it how to generate menus for the new wm.

Maybe applying awk and shell scripts to the 'filesystem view' instead of perl should help to keep size down.

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#18 Post by edoc »

Nathan F wrote:I have made a couple of dotpups that add menu entries automatically.
I tried to use the code from your Dillo dotpup building better dotpups from 08Jun2005 to create a thingamablog dotpup as follows:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/sh

# installs thingamablog and registers with pupget
# dotpup made August 2005 by David Colburn using code by Nathan Fisher

# this script automatically runs after the dotpup file is unzipped
# it can rm, mv, cp files and dirs
# it can ln or rm symlinks
# it can run programs

# unzip the files using absolute paths
# paths relative to $HOME might be better

tar -xzP --no-same-owner -f dotpup.tar.gz

# registering with pupget
# dillo_patched.files & dillo_patched.keyword are included in tarball

# I commented out the next two lines because I didn't understand what it was doing!

# echo '"dillo_patched" "dillo_patched: extended version of dillo" on "extended version of dillo" \' >> /root/.packages/alienpackages.txt
# sleep 1

# this part of the script will register thingamablog in the fvwm95, jwm, and icewm menus

### register in the fvwm95 menu
# entry is placed just above smm
FVWM95RC="/root/.fvwm95rc"
if [ -f $FVWM95RC ] ; then
# this option is used to prevent the entry from going in more than once
grep "/usr/local/bin/thingamablog" $FVWM95RC
if [ $? -ne 0 ] ;then
cp -f $FVWM95RC /tmp/DOTfvwm95.thingamablog.backup
EDITTEXT="s/^\(.\+Exec smm\)/+ "thingamablog javablogapp%thingamablog.xpm%" Exec exec \/usr\/local\/bin\/thingamablog\n\1/"
sed -e "$EDITTEXT" $FVWM95RC >/tmp/thingamabloginstall.tmp
mv -f /tmp/thingamabloginstall.tmp $FVWM95RC
sleep 1
fi
fi

### register in the jwm menu
# entry is just above smm
JWMRC="/root/.jwmrc"
if [ -f $JWMRC ] ; then
# this option is used to prevent the entry from going in more than once
grep "/usr/loca/bin/thingamablog" $JWMRC
if [ $? -ne 0 ] ;then
cp -f $JWMRC /tmp/DOTjwm.thingamablog.backup
EDITTEXT="s/^\(.\+Program label="SMM email prefilter.\+$\)/<Program label="thingamablog javablogapp" icon="thingamablog.xpm">exec \/usr\/local\/bin\/thingamablog<\/Program>\n\1/"
sed -e "$EDITTEXT" $JWMRC >/tmp/thingamabloginstall.tmp
mv -f /tmp/thingamabloginstall.tmp $JWMRC
sleep 1
fi
fi

### register in the icewm menu
# entered just above smm
ICEWMMENU="/root/.icewm/menu"
if [ -f $ICEWMMENU ] ; then
# this option is used to prevent the entry from going in more than once
grep "/usr/local/bin/thingamablog" $ICEWMMENU
if [ $? -ne 0 ] ;then
cp -f $ICEWMMENU /tmp/icewmmenu.thingamablog.backup
EDITTEXT="s/^\(.\+prog "SMM email prefilter.\+$\)/\tprog "thingamablog javablogapp" thingamablog \/usr\/local\/bin\/thingamablog\n\1/"
sed -e "$EDITTEXT" $ICEWMMENU >/tmp/thingamabloginstall.tmp
mv -f /tmp/thingamabloginstall.tmp $ICEWMMENU
fi
fi

# opening thingamablog

/usr/local/bin/thingamablog
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Then in rxtv I performed the following steps:

# cd /root/thing
# ls
dotpup.sh thingamablog-1.0.2
# cd thingamablog-1.0.2
# ls
README.txt lib templates
dictionaries license.txt thingamablog.jar
# md5sum dotpup.sh *.* > md5sum.txt
# rm -f thingamablog.pup
# zip -9 thingamablog.pup dotpup.sh *.* md5sum.txt
updating: dotpup.sh (deflated 65%)
updating: README.txt (deflated 48%)
updating: license.txt (deflated 62%)
updating: md5sum.txt (deflated 33%)
updating: thingamablog.jar (deflated 12%)

I then opened rox went to ~/thing/thingamablog-1.0.2 and clicked on thingamablog.pup and ran it.

Nothing seems to have happened that I can identify and there were no error messages.

What hath I wrought?

Thanks! doc
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#19 Post by rarsa »

Apparently this thread lost steam very quickly. Good news are. I've revived it.
http://www.murga.org/~puppy/viewtopic.p ... highlight=

There are some tasks that require your help.

I asume that if you were following this thread is because you care for a solution.

Post Reply