How to turn JWM menu items into desktop shortcuts

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

How to turn JWM menu items into desktop shortcuts

#1 Post 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
Attachments
mm_menuinfo.gz
Version 2018-02-08 ; Please remove fake .gz extension
(4.61 KiB) Downloaded 625 times
mm_menuinfo_20180208.jpg
Version 2018-02-08
(75.33 KiB) Downloaded 1730 times
Last edited by MochiMoppel on Thu 08 Feb 2018, 05:37, edited 5 times in total.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#2 Post by bigpup »

Very good!!!!

Tahrpup 6.0.3

Seems to be all working.

Thanks!!
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

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

#3 Post 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!

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

#4 Post 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.

.
Last edited by MochiMoppel on Mon 07 Sep 2015, 12:41, edited 1 time in total.

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

#5 Post 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.
Attachments
taskbar.jpg
(4.97 KiB) Downloaded 1383 times

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

#6 Post 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:

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

#7 Post 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.

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

#8 Post 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.

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

#9 Post 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!

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

#10 Post 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

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

#11 Post 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)
Attachments
panel_active.jpg
(96.64 KiB) Downloaded 1204 times

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

#12 Post 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?

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

#13 Post 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.

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

#14 Post 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:
Attachments
working_ok.jpg
(47.96 KiB) Downloaded 1159 times

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#15 Post 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.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

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

#16 Post 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.
Attachments
mm_menuinfo_20180208.jpg
(75.33 KiB) Downloaded 291 times

Peter444
Posts: 36
Joined: Tue 04 Sep 2007, 02:58
Location: Brisbane Queensland Australia

How to turn JWM menu items into desktop shortcuts

#17 Post 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

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

#18 Post 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!

Post Reply