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
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityNeed 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/
Reference: Freedesktop Menu Specification
Based on info from http://www.omgubuntu.co.uk/2013/05/add-categories-to-gnome-shell-dashboard and http://en.wikibooks.org/wiki/Using_GNOME/Application_menus
You need to open the dconf Editor (command dc)
From there navigate to org > gnome > shell You should see an entry called "app-folder-categories". Double click on this and add/remove categories as you desire.
You can also use the gsettings tool
gsettings get org.gnome.shell.app-folder-categories
would should you the current categories and you can use the set command write a new value (which would be a comma separated list of your categories.
To place you software into the new category you will need to edit the .desktop launcher files located in /usr/share/applications/ . There should be one for each application, if you open one in your editor you should see an entry called "Categories" and you can add/remove categories (including the one you just created).
This extension should do what you want: https://extensions.gnome.org/extension/1217/appfolders-manager/