Create submenu in JWM

Moderators: 666philb, Forum moderators

Post Reply
hikohan
Posts: 48
Joined: Wed Mar 13, 2024 12:08 am
Has thanked: 8 times
Been thanked: 13 times

Create submenu in JWM

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

Attachments
Screenshot.png
Screenshot.png (142.46 KiB) Viewed 259 times
hikohan
Posts: 48
Joined: Wed Mar 13, 2024 12:08 am
Has thanked: 8 times
Been thanked: 13 times

Re: Create submenu in JWM

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

Attachments
Screenshot.png
Screenshot.png (118.07 KiB) Viewed 236 times
Post Reply

Return to “Fossapup64”