this is the thread formerly known as Add A JWM Bookmarks Menu or Submenu
drastically innocuous menu tweaking: instant access to folders or files opened by specific programs
and more recently subtitled
button, menu, and key tweaking: instantly access folders and files with specific programs
__________
if you open .jwmrc (turns out that /etc/xdg/templates/_root_.jwmrc is likely a better choice--no fixmenus issue as described below) and insert something like:
Code: Select all
<Menu label="bookROXmarks" icon="/root/puppy-reference/buttons icons etc/bookmarks.png" height="16">
<Program label="~" icon="/root/puppy-reference/buttons icons etc/bookmarks.png">rox /root</Program>
<Program label="/" icon="/root/puppy-reference/buttons icons etc/bookmarks.png">rox /mnt/home</Program>
<Program label="mnt" icon="/root/puppy-reference/buttons icons etc/bookmarks.png">rox /mnt</Program>
<Program label="sc3" icon="/root/puppy-reference/buttons icons etc/th_jeff-foott-killer-whale-petroglyph_zps59d28c0f.jpg">libreoffice4.2 --writer /mnt/mmcblk0p2/Dropbox/ANCN/sc3.odt</Program>
<Program label="S" icon="/root/puppy-reference/buttons icons etc/bookmarks.png">rox /root/Startup</Program>
<Program label="applications" icon="/mnt/sda3/Copysda3/Copy/My Documents-20gigsync/Software/custon icons/IMAG0017.jpg">rox /usr/share/applications</Program>
<Program label="MMMMMM" icon="/root/puppy-reference/buttons icons etc/bookmarks.png">rox /mnt/home/precise-5.6.1/Dropbox/MMMMMMMMM</Program>
<Program label="custom icons" icon="/root/puppy-reference/buttons icons etc/ant nebula.jpg">rox "/root/puppy-reference/buttons icons etc"</Program>
<Program label="DWNLDSFFF" icon="/root/puppy-reference/buttons icons etc/babyElephant.jpg">rox "/mnt/sda2/downloadsFFFsda2"</Program>
<Program label="mtptempypalette" icon="mini-palette.xpm">mtpaint "/mnt/mmcblk0p2/Dropbox/small empty.png"</Program>
</Menu>
you get fast access to the folders of your choice or files opened by the programs of your choice. if the file name (target directory, file, or image) has spaces in it, use quotation marks around it. this model will give you instant access to applications, root, and home... it has libreoffice 4.2 opening a specific file, and mt paint opening a specific file (blank template); you'd need to alter these entries and the image icon choices to suit your machine and preferences. i included the browser download folder template because i just pasted this from one machine to another and needed to alter that. so, it works. it's also easy to repair, modify, and spread to other installations.
the whole chunk of text can be placed pretty much anywhere in the first 99 percent of the .jwmrc file in root--if you want it as a submenu, place it inside an existing menu. if you want it as its own menu, look for <menu> as an easy aid in seeing where one entry ends and other begins. or you could just put it at the top, right under
Code: Select all
<RootMenu label="Menu" labeled="false" height="24" onroot="3">
changing the rox command in the above examples allows you to open the directories with other file managers, so that's why i used JWM in the thread title. my own personal rox-reliant menu reflects what it contains and the aspect of it that is most likely to grow. highly mess aroundable. have fun.
screeny:
those towel over the stall bookmarks, the bright white ones, activate disciple's excellent bookmark script, which gives you both gtk and rox bookmarks in a configurable popup.
in short,
Code: Select all
<Program label="title on menu" icon="location of the image you want as an icon for the entry">program "name of file or folder you want that program to open"</Program>
skip the "name of file you want that program to open" bit to just make it into a regular launcher. include the full path of the program if it itself is a hack, a script, or just something that got installed in a non-traditional location and is without a .desktop entry in usr/share/applications.
***
as has been correctly pointed out in this post, i'm ignoring
or am ambivalent about
Code: Select all
<!-- IMPORTANT, ONLY EDIT /etc/xdg/templates/_root_.jwmrc -->
you can drag folders or files to an xpad or leafpad window to get the paths you can copy into the template, or you can go to
/root/.config/rox.sourceforge.net/ROX-Filer/ and open that file as text to easily get the rox locations you have bookmarked. the gtk bookmarks are located in /root/.gtk-bookmarks.
...hopefully this will soon be a bit less hackey...if MochiMoppel continues to provide feedback, that will surely be the case. As it stands, following the advice he gives there (use /etc/xdg/templates/_root_.jwmrc instead of .jwmrc) makes it persistent through all foreseeable natural stressors.
paste your custom menu in /etc/xdg/templates/_root_.jwmrc in a place that appears to correlate to where you want it in the actual menu. i'll post when i work out how to put submenus in the existing, stock menus without reverting to the previous method, or have anything else to add. as it stands, it's reliable, functional, and fast, and your own submenus will carry over if they are a part of a newly created menu entry. as an example of how simply this works: i just made some changes to my menu (in .jwmrc) and noticed that 1) i should give partview a more prominent position, and 2) i'm not using the latest partview. i saved the repositioned, old partview version of the .jwmrc file as 512.jwmrc, installed the pet, saved the 512.jwmrc file as .jwmrc, and did a jwm restart--the menu as i want it with the new pet installation reflected (and the harm taken out of the fixmenus command all pet and sfs installations appear to automatically run.) The same technique also worked for recent libreoffice pet and sfs installations.
thanks to MochiMoppel, puppy_apprentice, and disciple. etc.
(playing around with this stuff is too fun sometimes).
(and thanks, BarryK.)
***
You Must Restart JWM to See Your Changes.
edit: messing around, i find .jwmrc more accurately reflects one's customizations, but i'm not going to officially recommend going against the caution the file itself gives. i keep a separate document synced to the cloud and work on it from time to time, sharing the changes between computers. copy, paste, save--you'll eventually have so many menus that you'll be glad to lose a few from time to time.
also, changes in /etc/xdg/templates/_root_.jwmrc are more permanent, but can be corrected almost as easily (a simple "fixmenus" won't do it, but a file swap/rename is arguably just as simple) as the ones in .jwmrc--just make sure to keep a backup of the pristine version--using the skeletal structure isn't as intuitive as seeing the text of the menu laid out for you, and there's a bit of an extra delay before you see if maybe you may want to try again. if you get carried away with moving and pasting, it may just be easier to drop in the backup than try to undo what you've done.
both methods are pretty handy. and i personally back up both the most recent modded .jwmrc and the original (though the machine does the latter automatically. there's also a built in back up made for the _file in .../templates), but i guess the way to look at it is this: play around in .jwmrc and move the changes to /etc/xdg/templates/_root_.jwmrc when you are sure you want to keep them. nesting modded menus in the existing ones still works, but you (i'm guessing--will try it soon.) just have to comment out the placeholders for the existing menus so that you don't end up with duplicate slots for any of the original set (edit: nope, need a better guess. something more than that is needed to get rid of the originals...).
here's a template for a menu button:
Code: Select all
<TrayButton popup="bookmarks" icon="/root/.icons/rox-toolbar/reflection/bookmarks.png"border="true">exec:bm</TrayButton>
the bookmarks pics in /root/.icons/rox-toolbar/reflection/bookmarks.png will work because as a guess it's in your puppy. more likely than the one i just swapped out...
menu buttons get placed in ~/.jwmrc-tray. you can put them, at least as far as i can tell, anywhere between the far left and the desktops, the active app bar and pod with the blinking lights and volume/battery icons, and between that thing and the clock. i haven't tried to move the clock over for it.
you can bind a key to the action/program/menu by heading back over to .jwmrc and scrolling towards the bottom, adding an (for this example) exec:bm key or changing something into one. if that works out, you can make the change more permanent by doing the same thing in /etc/xdg/templates/_root_.jwmrc.
helpful hint:
placing
Code: Select all
<Menu label="original menu" icon="" height="16">
Code: Select all
<RootMenu label="Menu" labeled="false" height="24" onroot="3">
Code: Select all
</Menu>
right above
Code: Select all
</RootMenu>
Code: Select all
</Menu>
Code: Select all
<RootMenu label="Menu" labeled="false" height="24" onroot="3">
helpful hint 2:
Code: Select all
<!-- Virtual Desktops -->
<!-- Name tags can be contained within Desktops for desktop names. BK: syntax change with jwm 500... -->
<Desktops width="3" height="1"/>
i'm very fond of my menu.
edit: here's an easy workaround for the consequences of ignoring the IMPORTANT, ONLY EDIT /etc/xdg/templates/_root_.jwmrc warning atop .jwmrc and here are possibly the easiest ways to access all your rox bookmarks through jwm.