Page 1 of 1

How to turn JWM menu items into desktop shortcuts

Posted: Wed 02 Sep 2015, 12:59
by MochiMoppel
JWM provides no easy way to turn a menu item of the main menu into a ROX pinboard ( aka "desktop") shortcut (see also this post). JWM also obscures the name and location of the related executable behind a more or less useful menu label.

The attached script tries to provide more information on each JWM menu item and makes it easy to create a desktop shortcut.
The script does not create any tmp or config files. Sorry, no pet, just a single file.

Step 1: Download script, remove fake .gz extension, make it executable and run it.
Step 2: From the tiny MI window select a menu item
Step 3: From the JWM Menu Info dialog you can
- Select and copy info into clipboard
- Run the item (just like from the "real" menu)
- Open a ROX-Filer window with the executable already selected
- Create a desktop shortcut

That's all. Should work in all recent puppies.


Version History
-------------------------------------------
2018-02-08

Posted: Thu 03 Sep 2015, 05:11
by bigpup
Very good!!!!

Tahrpup 6.0.3

Seems to be all working.

Thanks!!

Posted: Sun 06 Sep 2015, 20:19
by greengeek
Nice. Working well for me in my Slacko 5.6 derivative.
Is there any chance of you building a version of this that is able to graft the icon into the taskbar as an alternative to placing it on the desktop?
cheers!

Posted: Mon 07 Sep 2015, 03:08
by MochiMoppel
Which taskbar? JWM tray? The script doesn't need JWM to run. In Lucid 5.28 the default wm is openbox and the script still works, but openbox uses a taskbar different from JWM's tray. It's difficult to determine which of the many different taskbars is currently running, almost impossible to decide which one should receive a shortcut. A user can run multiple taskbars concurrently.

Edit
I'm afraid above statement was not clear enough. It means: No, I will not do that. Let's keep it simple.

.

Posted: Mon 07 Sep 2015, 05:32
by greengeek
MochiMoppel wrote:Which taskbar? JWM tray?
Yes, I think that is what I mean. I am referring to the "quickstart" tray just to the right of the menu icon at the bottom of the desktop on a Slacko 5.6 pup. (which I think is a standard woof pup?).
These days I tend to find it easier to start my programmes from the tray rather than closing windows or switching to a fresh virtual desktop to access desktop icons. I would find it quite handy to use your script to set up my "hot icons" on the tray at the start of the session rather than menu hunting each time I want to start or restart something during the session.

Posted: Sun 20 Sep 2015, 06:47
by MochiMoppel
greengeek wrote: I would find it quite handy to use your script to set up my "hot icons" on the tray at the start of the session
You are using the wrong kind of taskbar. The JWM tray is a semi-permanent place for application shortcuts, very limited and cumbersome to configure and not "hot" at all. ROX panels are much more versatile and allow drag&drop, icon repositioning etc. etc.

The next version of MenuInfo will add optional support for ROX panel shortcuts. Not that I think it's necessary, but it's only 3 lines of additional code, so what the heck :wink:

Posted: Sun 20 Sep 2015, 09:33
by greengeek
MochiMoppel wrote:The JWM tray is a semi-permanent place for application shortcuts, very limited and cumbersome to configure and not "hot" at all.
Ok, thanks for trying anyway. Much appreciated. Looking forward to giving the rox panels a go.

Posted: Wed 30 Sep 2015, 03:40
by MochiMoppel
I've uploaded a slightly improved version.

It now supports any .jwmrc as argument (e.g. via drag&drop). This makes it easy to click and mount an alternative main puppy sfs, drag the file /root/ .jwmrc of such sfs onto the script mm_menuinfo and examine the menu of a different puppy. Not much use for creating shortcuts, but interesting in many ways.

The generic description "Executable" is now replaced by "Script" or "Binary", depending on the MIME type. "Executable" only used as fallback if MIME type can't be determined, but this hopefully will never happen.

Greengeek's idea of panel shortcuts is included, but requires to edit 2 variables in the script. Looking forward to hearing from him if this is useful.

Posted: Wed 30 Sep 2015, 09:02
by greengeek
MochiMoppel wrote:Greengeek's idea of panel shortcuts is included, but requires to edit 2 variables in the script. Looking forward to hearing from him if this is useful.
I believe this will be very useful but I am so far unable to see how to make this work. I have tried changing SHORTCUT_TYPE and PANEL_EDGE but I can't see how the script would use these variables to add a rox panel. Does the rox panel need to exist beforehand? If so would this be part of .jwmrc-tray or something different such as .jwmrc-tray2? (It is probably self explanatory but my brain is fried tonight...). Thanks!

Posted: Wed 30 Sep 2015, 09:20
by MochiMoppel
greengeek wrote: Does the rox panel need to exist beforehand?
Yes. The same as the pinboard has to exist in order to put shortcuts on it.
If so would this be part of .jwmrc-tray or something different such as .jwmrc-tray2?
No, this has nothing to do with JWM! We are talking about ROX here. For creating panels see the manual

Posted: Wed 30 Sep 2015, 11:55
by greengeek
Aaaah yes - I had confused jwm panels with ROX panels. My bad.

I have now followed the manual instructions you linked and have created rox panels on different edges successfully, and also dragged items onto each side of the panel - but I am still unable to get menuinfo to send a menu entry onto the panel.

Unsure what I am doing wrong. I will try again tomorrow.

(The menuinfo icon shown on the panels was manually dragged there. Nothing appeared when I attempted to use menuinfo to do the placement of other items in the jwm menu - although the desktop shortcut function of menuinfo works properly)

Posted: Wed 30 Sep 2015, 12:30
by MochiMoppel
greengeek wrote:although the desktop shortcut function of menuinfo works properly)
That's not possible with the version shown in your screenshot. Are you sure you are running your edited version?

Posted: Wed 30 Sep 2015, 12:37
by greengeek
If I use your original version the desktop shortcuts appear as designed. However if I use my edited version (editing the two parameters shown in the screeny) I cannot see anything appear within the rox panel.

Posted: Wed 30 Sep 2015, 12:42
by greengeek
Oops, now its working ok. Now how did that happen?

Excellent. Thanks! More testing to follow after I get some sleep. I knew I shouldnt have had that coffee today. Cant concentrate. Cant sleep. Cant think. Darn caffeine..... why do I enjoy it so much :cry:

Posted: Fri 26 Jan 2018, 09:45
by bigpup
Would be nice if you made this a pet.

It is small enough to still post in the forum as a pet.

256KB is the forum limit for a attachment.

Posted: Thu 08 Feb 2018, 03:40
by MochiMoppel
Update 2018-02-08 (see initial post)

This is a maintenance update to support newer versions of JWM.
I also changed the code quite a bit to make it more robust against unusual/weird syntax found in some versions of JWM's config file. Surprisingly despite added code the script has become even faster. The power of sed? :lol:

@bigpup: Thanks for your suggestion, but I don't see why such a tiny single file should be petified. It's more suited for the tray than for the (already sufficiently cluttered) menu and for changing the shortcut type the user has to edit the script directly.

How to turn JWM menu items into desktop shortcuts

Posted: Sun 10 Jun 2018, 01:06
by Peter444
Thank you for making it easy for windows refugees

Using your script in dpup stretch 7.5ce

Health Wealth and Happiness for the future

Peter

Posted: Tue 12 Jun 2018, 02:25
by MochiMoppel
Thank you for your lavish wishes. I can hardly ask for more.

Windows refugees? You are certainly not one of them :lol:
Welcome back to the forum!