Page 1 of 1

How to Add Submenu to Start Menu?

Posted: Sat May 08, 2021 5:03 pm
by sonny

Hello,
How do I create a submenu in Puppy's start menu?
i.e. on "Fun" menu, I'd like to categorize "Role Playing", "Shooting", "Strategy", then place the items accordingly.
Cheers


Re: How to Add Submenu to Start Menu

Posted: Sat May 08, 2021 6:36 pm
by taersh

There is already sub-menus.
In /etc/xdg/menus there is some *.menu files.

This is the related snippet from /etc/xdg/menus/puppy-fun.menu.

Code: Select all

  <Layout>
    <Menuname inline="true" inline_limit="99">Fun-Sub</Menuname>
    <Separator/>
    <Menuname inline="true" inline_limit="99">Fun-adventure</Menuname>
    <Separator/>
    <Menuname inline="true" inline_limit="99">Fun-boardgame</Menuname>
    <Separator/>
    <Menuname inline="true" inline_limit="99">Fun-cardgame</Menuname>
    <Separator/>
    <Menuname inline="true" inline_limit="99">Fun-puzzle</Menuname>
    <Separator/>
    <Menuname inline="true" inline_limit="99">Fun-shooter</Menuname>
    <Separator/>
    <Menuname inline="true" inline_limit="99">Fun-arcade</Menuname>
  </Layout>

Change inline="true" to inline="false" or change inline_limit="99" to a lower number like inline_limit="5". The sub-category will close as soon as there's more than 5 entries.

In /usr/share/desktop-directories there is some *.directory files. Edit these files to change the title of the Menu category.
These are the related files for the Fun menu:

Puppy-Fun-adventure.directory
Puppy-Fun-arcade.directory
Puppy-Fun-boardgame.directory
Puppy-Fun-cardgame.directory
Puppy-Fun.directory
Puppy-Fun-puzzle.directory
Puppy-Fun-shooter.directory
Puppy-Fun-Sub.directory