thanks to
musher0 for the ae menu tutorial. for the aemenu method, you'll need
aemenu.tar.bz2, unpacked and placed in a /bin.
the following menu and the two letter launching code that will pop it up should be placed in /root and /root/my-applications/bin respectively. in addition to the defaults, some rox items, and the supplemental menus, you'll get a submenu that makes it easy to make your own ae or jwm menus from executable commands or full paths to progs/scripts, etc.
Code: Select all
menu "defaults/original puppy desktop"
cmd " audiomixer" defaultaudiomixer
cmd " audioplayer" defaultaudioplayer
cmd " browser" defaultbrowser
cmd " calendar" defaultcalendar
cmd " cdplayer" defaultcdplayer
cmd " chat" defaultchat
cmd " chmviewer" defaultchmviewer
cmd " ~ 'Chooser' ~" /usr/bin/defaults-chooser
cmd " connect" defaultconnect
cmd "console" "urxvt"
cmd " contact" defaultcontact
cmd " draw" defaultdraw
cmd " email" defaultemail
cmd " htmleditor" defaulthtmleditor
cmd " htmlviewer" defaulthtmlviewer
cmd " imageviewer" defaultimageviewer
cmd " mediaplayer" defaultmediaplayer
cmd " notecase" notecase
cmd " paint" defaultpaint
cmd "puppy package manager" "ppm"
cmd "puppy control panel" "pcp"
cmd " spreadsheet" defaultspreadsheet
cmd "screen shot" "tas"
cmd " texteditor" defaulttexteditor
cmd " textviewer" defaulttextviewer
cmd " videoplayer" defaultvideoplayer
cmd " wizardwizard" wizardwizard
cmd " wordprocessor" defaultwordprocessor
cmd "Xlock setup" "/usr/local/apps/Xlock/AppRun -configure"
cmd "Xlock lock screen" "/usr/local/apps/Xlock/AppRun -locknow"
end
menu "rox"
cmd "rox /" "rox /"
cmd " ~ ROX-Filer ~" "rox ~"
cmd " Close All Rox" "cr"
cmd " rox Recents " "rr"
cmd " rox Bookmarks" "rb"
cmd "applications" "rox /usr/share/applications"
cmd "/etc" "rox /etc"
cmd "/mnt" "rox /mnt"
cmd "/mnt/home" "rox /mnt/home"
cmd "my-applications" "rox /root/my-applications/bin"
cmd "my-documents" "rox /root/my-documents"
cmd "rox /tmp" "rox /tmp"
cmd "rox /root/.Trash" "rox /root/.Trash"
end
menu "launchers and consoles" # beginning of menu
cmd "findnrun" "fnr"
cmd "gexec" "gexec"
cmd "grun" "grun"
cmd "lxterminal" "lxterminal"
cmd "pexec" "pexec"
cmd "prun" "prun"
cmd "roxterm" "roxterm"
cmd "rxvt" "rxvt"
cmd "sakura" "sakura" # program to launch
cmd "urxvt" "urxvt"
end # end of menu
menu "supplemental 1" # beginning of menu
cmd "close all desktop instances" "cadi" # program to launch
cmd "close current desktop instances" "ccdi" # program to launch
cmd "partview" "partview" # program to launch
cmd "lxtask" "lxtask" # program to launch
cmd "htop" "htop" # program to launch
cmd "winswitcher" "winswitcher"
cmd "jwm -restart" "jwm -restart"
cmd "5copies" "5copies"
cmd "5copiesDir" "5copiesDir"
cmd "nwp" "wp"
cmd "left full" "b5"
cmd "right full" "b10"
cmd "slocate search all" "slac"
cmd "slocate search limited" "sloc"
cmd "slocate update databases" "sluc"
cmd "spacefm" "spacefm"
end # end of menu
menu "supplemental 2" # beginning of menu
cmd "chromium" "chromium"
cmd "firefox" "firefox"
cmd "galculator" "galculator"
cmd "gcolor2" "gcolor2"
cmd "gfnrename" "gfnrename"
cmd "gfontsel" "gfontsel"
cmd "goldendict" "goldendict"
cmd "google-chrome" "google-chrome"
cmd "palemoon" "palemoon"
cmd "pfind" "pfind"
cmd "recoll" "recoll"
cmd "xpad-backup" "xpad-backup"
cmd "xpad-clear" "xpad-clear"
cmd "xpad" "xpad"
end # end of menu
menu "jwm menu maker" # beginning of menu
cmd "jwmxx-leafpad-grab executables" "cd /usr/share/applications; grep Exec= *.desktop | grep -o 'Exec=.*' | cut -f2- -d'=' > /root/my-documents/Text/jwmxx; leafpad /root/my-documents/Text/jwmxx
cmd "jwmxx-geany-grab executables" "cd /usr/share/applications; grep Exec= *.desktop | grep -o 'Exec=.*' | cut -f2- -d'=' > /root/my-documents/Text/jwmxx; geany /root/my-documents/Text/jwmxx
cmd "make a menu entry" "jwmkr"
cmd "add the menu template" "jwmenuplate"
menu "ae menu maker"
cmd "ae menu item maker" "aeae"
cmd "ae menu slot maker" "aeaem"
end
end # end of menu
#menu "supplemental 3" # beginning of menu
#end # end of menu
#name mushu1 and place in /root to be able to launch it with the mm script below/change location in mm to reflect change in location or title of mushu1
#launcher
Code: Select all
#!/bin/sh
#aemenu -rc /root/mushu1
#name mm and place in /root/my-applications/bin/
killall -q aemenu
sleep 0.1s
aemenu -rc /root/mushu1
the jwmxx scripts strip the executable commands from /usr/share/applications and open a file (saved in my-documents/Text) containing them in either leafpad or geany. highlight and choose which type of menu item you want to make.
convenient to launch with a gexec or terminal shortcut, but it's so easy to modify you may want to have even more direct access and give it proper keycut---alt+ctrl plus a used for anything?
further details
here. i wasn't able to get the jwmkr, jwmenuplate, aeae, or aeaem scripts to work correctly from either a jwm menu or an ae menu as bare code, but they all work fine if you call them from /root/my-applications/bin by the titles the above ae menu uses.
aeae
Code: Select all
#! /bin/sh
# name aeae
# turn an executable into a menu item (aemenu)
xclip -o | sed 's/^/cmd "title-here" "/' | sed 's/$/\"/' | xclip -selection clipboard
xdotool type "`xclip -out -selection clipboard`"
aeaem
Code: Select all
#! /bin/sh
# name aeaem
# ae menu slot template
xdotool type 'menu "title"
(your menu here)
end
'
jwmkr
Code: Select all
#! /bin/sh
# name jwmkr
# use on executables/ paths to executables
# adds jwm menu tags around a selection of text in any text editor
xclip -o | sed 's/^/<Program label="" icon="">/' | sed 's/$/<\/Program>/' | xclip -selection clipboard
xdotool type "`xclip -out -selection clipboard`"
jwmenuplate
Code: Select all
#! /bin/sh
#name jwmenuplate
xdotool type "<Menu label="pick a better title" icon="/path/to/img_wots_opt_icon.jpgpngsvg" height="16">
[delete this and place your entries here]
</Menu>
"
the two jwmxx entries (jwmxx-leafpad/geany-grab executables) strip the executable commands from the .desktop files in usr/share/applications. to make an off PATH executable, program, or script into a menu item for either aemenu or jwm, highlight its full path and click the appropriate menu-item maker. works for individual commands/paths or batches, separated by line break or space doesn't seem to matter though i usually rely on the former and i'm relying on memory to attest the latter works. you can mix commands and paths--the script (based on miriam's ht-b) appears to be looking for breaks in the continuity of the text...(i think this is called whitespace)
---------------
for the jwm menu, add the following two scripts to /root/my-applications/bin/
(more to play it safe--the code may actually work when directly added to the menu between <program> tags, but i know for sure it works this way...
Code: Select all
#! /bin/sh
#name gge (for geany-grabexec) and place in /root/my-applications/bin
cd /usr/share/applications; grep Exec= *.desktop | grep -o 'Exec=.*' | cut -f2- -d'=' > /root/my-documents/Text/jwmxx; geany /root/my-documents/Text/jwmxx
Code: Select all
#! /bin/sh
#name lge (for leafpad-grabexec) and place in /root/my-applications/bin
cd /usr/share/applications; grep Exec= *.desktop | grep -o 'Exec=.*' | cut -f2- -d'=' > /root/my-documents/Text/jwmxx; leafpad /root/my-documents/Text/jwmxx
highlighting
aeae
aeaem
lge
gge
jwmkr
jwmenuplate
and then using the aemenu to select "make a menu entry" yields:
Code: Select all
<Program label="" icon="">aeae</Program>
<Program label="" icon="">aeaem</Program>
<Program label="" icon="">lge</Program>
<Program label="" icon="">gge</Program>
<Program label="" icon="">jwmkr</Program>
<Program label="" icon="">jwmenuplate</Program>
the jwmenutemplate is just typing/remembering the following for you when you select "add the menu template":
Code: Select all
<Menu label="pick a better title" icon="/path/to/img_wots_opt_icon.jpgpngsvg" height="16">
[delete this and place your entries here]
</Menu>
for both the menu and its entries, the
icon="" slot will take the path to an image of your choice and use it to add it to the menu, whether huge or small, jpg, png, svg--so far every image i've tried works (don't expect to see many details if you're squishing a screen or two down to a pinky nail).
the default is to fill in the program (you could alter it to do the name or image on the menu instead), leaving the name and icon slots blank. fill those in and optionally surround the whole thing with <JWM> at the beginning and </JWM> at the end. this will allow you to paste the singe line <Include>path/to/menu</Include> into the target root menu instead of having to paste the whole thing/open the whole thing to edit this one piece.
so, putting the two pieces together and adding titles for the menu slots gives us
Code: Select all
<Menu label="JWM Menu Maker" icon="" height="16">
<Program label="make an aewm menu item" icon="">aeae</Program>
<Program label="make an aewm menu/submenu" icon="">aeaem</Program>
<Program label="leafpad--grab execs" icon="">lge</Program>
<Program label="geany--grab execs" icon="">gge</Program>
<Program label="make a JWM menu item" icon="">jwmkr</Program>
<Program label="make an JWM menu/submen" icon="">jwmenuplate</Program>
</Menu>
a menu that will make menu making even easier.
______
path gathering tip:
when making menus, it's often helpful to be able to easily grab the paths of one or more files (full paths always work if the permissions are set and the file's okay--the bare name may not). an easy way using a combination of rox filer and either leafpad or xpad is to highlight the file(s) you want in a rox window and then either middle click-pasting or dragon dropping the highlight to the x- or leafpad window. for geany, only the middle click pasting method works--dragging the files to the geany window will open them in geany (i.e. same behavior as a desktop icon).