Add A JWM Bookmarks Menu or Submenu/Messing Around With JWM

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#46 Post by Puppus Dogfellow »

MochiMoppel wrote:
Puppus Dogfellow wrote:... the entire original menu compressed into one line. my workaround for fixmenus is to right click copy .jwmrc (add something to the file before the period and press enter) after every major change or restructuring. then, if i have to run fixmenus or install/uninstall something, i do that as normal, then go back to the renamed .jwmrc file, remove what i added to the file name, resave, and restart jwm. everything is saved and updated. it's not ideal, but it works.
Again I'm completely lost. With all this jumping around and the lengthy full quotes this thread is hard to follow and I have no idea what you have or want to achieve. "compressed into one line"? And what is this rename business? Surely unnecessary, but without knowing your current main menu it's hard to propose alternatives.
"compressed into one line" as in i have something like
<Menu label="original menu" icon="" height="16">

[the entire original menu with many of my own menus buried within the extant categories, plus what ever menus and submenus i added outside it, under it, within it, etc]

</Menu>
in most of my machines' .jwmrc files.

the rename business is related to the fact that i don't know how to make the _root_.jwmrc file act exactly like the .jwmrc file--i have no idea how to embed the existing menus into one another or make my own menus into submenus of what's already there. since i know that .jwmrc allows it, i back mine up (rename a copy) and overwrite (rename it back) the "fixmenued" .jwmrc after installation/uninstallation of files/after fixmenus does its thing.

in short, it wouldn't be an issue if i knew how to edit the menus themselves in _root_.jwmrc (or wherever it supposed to be done) and not just the spaces around them. i supposed an additional root menu or two would also accomplish what i want.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#47 Post by greengeek »

I think I'm finally getting to grips with this...

I added a combo of mushers jwmrc snippet with fragments of the UUID code (all added into the /etc/xdg/templates/_root_.jwmrc file) then did a fixmenus and jwm restart and I'm really happy with the outcome so far:
Attachments
Newplacesmenu_.jpg
(74.41 KiB) Downloaded 443 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#48 Post by musher0 »

Way to go, greengeek! :)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#49 Post by musher0 »

MochiMoppel wrote:
musher0 wrote:The following little script will open the Puppy's "home", meaning: the folder in
/mnt/home where the main Puppy sfs is located.
Hi musher0, why don't you put your script directly into the menu? This one-liner is not much longer than the path to your script :lol:

I propose:

Code: Select all

<Program label="Puppy's Home" icon="mini-filemgr.xpm">. /etc/rc.d/PUPSTATE ; rox "/mnt/$PDEV1$PSUBDIR"</Program>
(...)

This is how my /mnt looks after a fresh boot:
Hello, MochiMoppel.

I tried your $PDEV1 trick and it didn't work for me. That's why I composed my script.

BFN.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#50 Post by MochiMoppel »

musher0 wrote:I tried your $PDEV1 trick and it didn't work for me.
Strange. Are you using Precise 5.6? I remember that this version didn't write a value for PDEV1 into /etc/rc.d/PUPSTATE and I considered it a bug, fixed in 5.7.

My etc/rc.d/PUPSTATE contains

Code: Select all

PUPMODE=5
PDEV1='sdb1'
DEV1FS='vfat'
PUPSFS='sdb1,vfat,/pup_slacko/puppy_slacko_5.6.sfs'
PUPSAVE=''
.
.
.
PSUBDIR='/pup_slacko'
Everything needed for the code is in there. If PDEV1 is empty, you can still grep it from PUPSFS.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#51 Post by musher0 »

I'm on Precise 5.7.1 right now. I used $PUPSFS.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#52 Post by MochiMoppel »

Yes, I know that you used $PUPSFS. My questions was:why? Do $PDEV1 and $PSUBDIR not exist in your PUPSTATE file? Are they empty?

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#53 Post by musher0 »

MochiMoppel wrote:Yes, I know that you used $PUPSFS. My questions was:why? Do $PDEV1 and $PSUBDIR not exist in your PUPSTATE file? Are they empty?
Hello, MochiMoppel.

I'll double check, but I'm in no hurry: the script does work the way it is. :)

I posted here tonight to say that I kind of disagree with you on putting a series of
commands inside the jwm menu. It's great that you can do that with jwm, it's a nice
feature of jwm, but if you ever change window managers, it's simpler to copy and
paste just the filename of a script in a menu, instead of having to pluck out and re-
create an entire script from a jwm menu.

I'm saying this because, actually, my favorite windows managers are pekwm (no 1,
in my mind) and lxp-icewm (no2) -- not jwm. Although, being a Puppy-ist, I could not
escape getting acquainted with some jwm features.

BFN.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#54 Post by MochiMoppel »

musher0, this thread is about JWM. Nothing discussed here is supposed to work in other window managers.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#55 Post by MochiMoppel »

Puppus Dogfellow wrote: i don't know how to make the _root_.jwmrc file act exactly like the .jwmrc file--i have no idea how to embed the existing menus into one another or make my own menus into submenus of what's already there. since i know that .jwmrc allows it, i back mine up (rename a copy) and overwrite (rename it back) the "fixmenued" .jwmrc after installation/uninstallation of files/after fixmenus does its thing.
This means you back up your customized .jwmrc, do your installation (which creates an updated .jwmrc), then you overwrite the updated .jwmrc with your backed up previous version? Loosing the changes?

I still have no clue what your /etc/xdg/templates/_root_.jwmrc looks like. Is this still the original file with an added <Menu label="original menu" icon="" height="16"> submenu? You said that this is what you have in .jwmrc. Since .jwmrc is a copy of _root_.jwmrc, it must be present there. If this is the case then you could put the whole "original menu" into a separate file. Name the file e.g. mymenu and save it wherever you like, even outside of Puppy. This separate file should look like this:
<?xml version="1.0"?>
<JWM>

<Menu label="original menu" icon="" height="16">
[the entire original menu with many of my own menus buried within the extant categories, plus what ever menus and submenus i added outside it, under it, within it, etc]
</Menu>
</JWM>

In your _root_.jwmrc replace the whole <Menu label="original menu" icon="" height="16"> ...</menu> section with
<Include>path/to/mymenu</Include>

You'll never have to touch _root_.jwmrc again. From now on you can make all your changes in mymenu, refresh this menu with a simple jwm -reload command and never have to worry about _root_.jwmrc destroying your custom menu in .jwmrc.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#56 Post by musher0 »

MochiMoppel wrote:musher0, this thread is about JWM. Nothing discussed here is supposed to work in other window managers.
Hi.

Please forgive me for being so frank... I find that funny :D, and a bit limited in view...
Do you mean that you forbid them to work in any other window manager?

As for me, I like to make scripts that have maximum usefulness. As my medieval
buddy Ockham always says: "Let's not multiply logical beings needlessly." :) If I can
create one (1) script that will work on a number of window managers, why not? I do
not wish to complicate my computer life more than is necessary! :)

But to each his/her own view, obviously.

Bye for now.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Jasper

#57 Post by Jasper »

PupMenu 3.5 (from radky) is designed for Menu access using a shortcut - or:
JWM, IceWM, Openbox, Fluxbox, LXDE and LXPanel

The PupMenu Bookmarks screen is pre-set. but easily editable, and works via Rox, Thunar, PCManFM or SpaceFM.

So there is a superb ready-made Bookmarks screen already available via JWM, but it's great to learn a lot more from MochiMoppel.

PS The screen shot reflects my choice to comment out some half of the pre-set bookmarks to obviate a vertical scroll bar.
Attachments
Shot.png
(61.93 KiB) Downloaded 350 times

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#58 Post by Puppus Dogfellow »

MochiMoppel wrote:
Puppus Dogfellow wrote: i don't know how to make the _root_.jwmrc file act exactly like the .jwmrc file--i have no idea how to embed the existing menus into one another or make my own menus into submenus of what's already there. since i know that .jwmrc allows it, i back mine up (rename a copy) and overwrite (rename it back) the "fixmenued" .jwmrc after installation/uninstallation of files/after fixmenus does its thing.
This means you back up your customized .jwmrc, do your installation (which creates an updated .jwmrc), then you overwrite the updated .jwmrc with your backed up previous version? Loosing the changes?

I still have no clue what your /etc/xdg/templates/_root_.jwmrc looks like. Is this still the original file with an added <Menu label="original menu" icon="" height="16"> submenu? You said that this is what you have in .jwmrc. Since .jwmrc is a copy of _root_.jwmrc, it must be present there. If this is the case then you could put the whole "original menu" into a separate file. Name the file e.g. mymenu and save it wherever you like, even outside of Puppy. This separate file should look like this:
<?xml version="1.0"?>
<JWM>

<Menu label="original menu" icon="" height="16">
[the entire original menu with many of my own menus buried within the extant categories, plus what ever menus and submenus i added outside it, under it, within it, etc]
</Menu>
</JWM>

In your _root_.jwmrc replace the whole <Menu label="original menu" icon="" height="16"> ...</menu> section with
<Include>path/to/mymenu</Include>

You'll never have to touch _root_.jwmrc again. From now on you can make all your changes in mymenu, refresh this menu with a simple jwm -reload command and never have to worry about _root_.jwmrc destroying your custom menu in .jwmrc.
i'll give that a try some time later, Mochi, thanks. still don't see how it allows me to compress the menu down to one line--the method i mentioned only works in .jwmrc, not ._jwmrc_. and at this point there are separate modifications to both (i.e. a real fixmenus gives me something i like, but not something i like best). i have one machine (frugal precise 5.5) that allows me to install/uninstall without messing up the menu. not sure why.

and, no, the changes aren't overwritten if i'm updating a program--the link just goes to the new thing that's there. adding a new program sometimes means copy-pasting the new entry to the new menu, or doing a restructuring resulting in a new and improved ( :P ) .jwmrc. your way sounds much neater and simpler and next time around i'll try it first. perhaps there was some other mistake i made when i tried to compress the original menu--doing it in _root_.jwmrc gave me the orange and red warning borders; the same wasn't true for the mod done in .jwmrc. i could post or link you the 1000-3000 line files for your perusal, but maybe this screenshot from my test mule computer (i'm actually down to two it seems--netbooks in a certain outlet in my house seem to die or develop issues. maybe i should start being more careful...) will show you what i want/mean. you can see the original menu as "multimedia" in the following shot:

Image

Of course there's a bit of redundancy, sort of like having more than one pen in a drawer. I guess that's how i view the menu--a drawer for my stuff. i want the most reached for stuff closest and most easily accessible. most of the menu i have little use for. and a bookmark to usr/share/applications is pretty handy for finding things i don't use much. copying and pasting what you want closest to you, even if it means recopying a full menu or category or two, doesn't require much space or resources. you could always go back and change the names later if you can't differentiate between what you recently made and what you made a while ago, though their relative position should eliminate all confusion.
Jasper wrote:PupMenu 3.5 (from radky) is designed for Menu access using a shortcut - or:
JWM, IceWM, Openbox, Fluxbox, LXDE and LXPanel

The PupMenu Bookmarks screen is pre-set. but easily editable, and works via Rox, Thunar, PCManFM or SpaceFM.

So there is a superb ready-made Bookmarks screen already available via JWM, but it's great to learn a lot more from MochiMoppel.

PS The screen shot reflects my choice to comment out some half of the pre-set bookmarks to obviate a vertical scroll bar.
and thanks for the tip, Jasper. I'll have to check that out as well. can the menu popup be activated at a click or inserted into the main jwm menu, or do you have to go into some sort of separate gui box to access the entries? seems less quick than some other methods...

i have to say, my original intention was to be able to easily get into the file manager; it felt like a lack of integration was causing me to find a spot on the desktop, a specific icon, or scroll through the root menu to do it. the shortcut key of alt+spacebar= /mnt (giving me one click access to the file manager's own bookmark menu, /,~, mnt/home, and every drive attached to the machine) does this quite nicely. all the rest is gravy. time consuming, somewhat fun, gravy.
:D
Last edited by Puppus Dogfellow on Wed 21 May 2014, 15:36, edited 1 time in total.

Jasper

#59 Post by Jasper »

Per Shot(1) - to load a chosen bookmark - I could right click the green M in the tray to bring up the ROX menu (from stu90/91) then I'd click the highlighted option to load PupMenu (from radky) then I'd click the Bookmarks button and choose my bookmark.
Total elapsed time - say, 4 seconds. Frequency say. once-a-month.

The top two menu choices are from MochiMoppel though perhaps best used with multi-session CD/DVDs.
Even the dividers perform actions when clicked - e.g. the bottom one Restarts JWM
--------------
Shot(2) shows three extra JWM menus:

Top centre - SFS-Tray (from seaside) - an icon click loads the chosen sfs - then exiting the app auto-unloads the sfs.

The Menu shown is JWM favorites (also from seaside) - it opens by a left click on a blank space or the Swiss flag icon.

Bottom centre - is Applications Panel Config (from mavrothal)

I also use a couple of excellent JWM Menus apps (from Technosaurus) and my Main/right click JWM menu is cut down and customised to four sections and eighteen choices using PupMenu (from radky).
Attachments
Shot(1).png
(34.96 KiB) Downloaded 401 times

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#60 Post by Puppus Dogfellow »

cool setup, Jasper.

any chance you can give the links to the programs you used?

i'm getting a little buggy with these key combos and think they're really all i need.
:lol:, but that stuff is cool and may be of interest to anyone looking to this thread to help them customize their own setups. thanks.

...

just took a look at icewm and am wondering why jwm made the change to all those separate config files. what's the advantage? seems as needlessly convoluted as some of my menus are...

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#61 Post by Puppus Dogfellow »

MochiMoppel wrote: [...] you could put the whole "original menu" into a separate file. Name the file e.g. mymenu and save it wherever you like, even outside of Puppy. This separate file should look like this:
<?xml version="1.0"?>
<JWM>

<Menu label="original menu" icon="" height="16">
[the entire original menu with many of my own menus buried within the extant categories, plus what ever menus and submenus i added outside it, under it, within it, etc]
</Menu>
</JWM>

In your _root_.jwmrc replace the whole <Menu label="original menu" icon="" height="16"> ...</menu> section with
<Include>path/to/mymenu</Include>

You'll never have to touch _root_.jwmrc again. From now on you can make all your changes in mymenu, refresh this menu with a simple jwm -reload command and never have to worry about _root_.jwmrc destroying your custom menu in .jwmrc.
Mochi, what would it take to set that "mymenu" file up as a separate menu with its own button and click activation? can i have a task bar button inserted into .jwmrc-tray from this file in the same way? how about setting up which mouse click/click combo activates it? if that is all possible through the new file, can you show me how to set it up? thanks in advance.

...i suppose making my custom menu root:3 and the original menu something else would achieve what i'm doing in a better way...

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#62 Post by greengeek »

Puppus Dogfellow wrote:perhaps there was some other mistake i made when i tried to compress the original menu--doing it in _root_.jwmrc gave me the orange and red warning borders; the same wasn't true for the mod done in .jwmrc.
What were the orange and red warning borders? Sounds a bit like what happened to me a couple of times - and I'm still not sure why. I lost my tray at the bottom of the screen and had orange window borders. Had to manually load a backup .jwmrc but really didn't know what I had done to cause the problem.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#63 Post by musher0 »

Jasper wrote:PupMenu 3.5 (from radky) is designed for Menu access using a shortcut - or:
JWM, IceWM, Openbox, Fluxbox, LXDE and LXPanel
(...)
So there is a superb ready-made Bookmarks screen already available via JWM, but it's great to learn a lot more from MochiMoppel.
(...)
Hi, Jasper.

Do you have a URL handy for those little jewels? :) Thanks in advance.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#64 Post by greengeek »

MochiMoppel wrote:The code runs the blkid command to find the UUIDs of all devices... This is quite slow, blkid needs some time.
While I was looking around in /etc I saw a file called blkid-cache. It seems to be populated during the boot process. Maybe that would be a possible source for faster access to the blkid info?

EDIT : No, ignore that - it seems as if that /etc/blkid-cache is just 'historic' info, not updated realtime for current purposes.
Last edited by greengeek on Wed 21 May 2014, 20:29, edited 1 time in total.

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#65 Post by Puppus Dogfellow »

greengeek wrote:
Puppus Dogfellow wrote:perhaps there was some other mistake i made when i tried to compress the original menu--doing it in _root_.jwmrc gave me the orange and red warning borders; the same wasn't true for the mod done in .jwmrc.
What were the orange and red warning borders? Sounds a bit like what happened to me a couple of times - and I'm still not sure why. I lost my tray at the bottom of the screen and had orange window borders. Had to manually load a backup .jwmrc but really didn't know what I had done to cause the problem.
if things aren't perfect--or in fact are completely messed up--jwm doesn't stop working, it just lets you know it is unhappy by using some garish theme. one bracket out of place is enough to cause it. yeah, sometimes the tray disappears as well under those conditions. i think it happens no matter what jwmrc-type file you mess up. it's expecting something a certain way and gets cranky when it doesn't find it. i guess preventing this sort of thing is what that jwm -p command is for...

***

maybe someone should link or post some untouched _root_.jwmrc and jwmrc files here--i don't think i have any left. could be useful down the line...

Post Reply