Page 1 of 1

Create submenu in JWM

Posted: Wed Feb 05, 2025 6:25 am
by hikohan

eg: Add submenu as attached screenshot shows.

In `/etc/xdg/menus/puppy-internet.menu` mod to

Code: Select all

..
  <Menu>
    <Name>Internet-login</Name>
    <Directory>Puppy-Internet-login.directory</Directory>
    <Include>
      <Category>X-Internet-login</Category>
    </Include>

	<Menu>
		<Name>PuTTY</Name>
		<Directory>Puppy-Internet-login-sub.directory</Directory>
		<Include>
		  <Category>X-Internet-login-sub</Category>
		</Include>
	</Menu>    
  </Menu>
..

Add new your.desktop to category `X-Internet-login-sub`.

Further more, if it's possible to set submenu icon is PERFECT. :thumbup2:


Re: Create submenu in JWM

Posted: Wed Feb 05, 2025 8:09 am
by hikohan

Found answer from `https://wikka.puppylinux.com/Configure_PuppyMenu`

Code: Select all

How to make a new submenu in the JWM menu

1. Create a new .menu file in /etc/xdg/menus for your submenu, ensure the categories you want are in the submenu are included.
2. Edit /etc/xdg/templates/_root_.jwmrc to tell it about he new .menu file you made.
3. A program's .desktop file (in /usr/share/applications) sets its category and therefore which submenu it appears in.
4. To set the icon creat a .directory file in /usr/share/desktop-directories.
5. Enter the commands fixmenus then jwm -restart to update Puppy

create a file Puppy-Internet-login-sub.directory describe directory property in `/usr/share/desktop-directories/`

eg:

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Putty
Icon=putty.xpm
Type=Directory

After fixmenu refresh, works perfectly. :thumbup2: