I want to create a custom category menu. How can I do that?
For example, I want to create a category menu named "Halogen" like Accessories, Games, Graphics, Internet..etc
I want to create a custom category menu. How can I do that?
For example, I want to create a category menu named "Halogen" like Accessories, Games, Graphics, Internet..etc
These instructions are using system directories. Same setup could be done using user config directories, see linked docs for user path locations.
Need to write an XML .menu file to be installed in /etc/xdg/menus/applications-merged/
Example /etc/xdg/menus/applications-merged/hamradio.menu
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<Menu>
<Name>Applications</Name>
<Menu>
<Name>Hamradio</Name>
<Directory>HamRadio.directory</Directory>
<Include>
<Category>HamRadio</Category>
</Include>
</Menu> <!-- End hamradio -->
</Menu>
A .directory file to be install in /usr/share/desktop-directories/
Example /usr/share/desktop-directories/HamRadio.directory ([...] I removed some lines)
[Desktop Entry]
Type=Directory
Encoding=UTF-8
Name=Hamradio
Name[bg]=Любителско радио
Name[ca]=Radioaficionat
Name[cs]=Amatérské rádio
[...]
Name[vi]=Truyền thành tài tử
Name[zh_CN]=业余无线电
Name[zh_TW]=業餘無線電
Icon=CQ.png
Add category to Categories= in application .desktop file and should be install in /usr/share/applications/
Official Reference here: Freedesktop Menu Specification. Menu file paths explained here: Menu paths.
Above docs mentiones only system level directories (common for all users and require superuser permissions). Ray's Notebook - Computing: Base Directories and Their Sub-Directories shows user local config too.