#!/usr/sbin/install-menu # freedesktop menu spec - menu generation # http://www.freedesktop.org/Standards/menu-spec # Also used as /etc/menu-methods/kicker # Copyright 2004 - Chris Cheney # Licensed under the GNU General Public License, version 2. compat="menu-1" !include menu.h compat="menu-2" function TopDirs() = ifempty($section, "\n" "\n" ifroot( "/usr/share/applications-alt\n" "/usr/share/desktop-directories-alt\n", "" parent(parent(prefix())) "/.local/share/applications-alt\n" "" parent(parent(prefix())) "/.local/share/desktop-directories-alt\n" )); function BottomDirs() = ifempty($section, "\n" "applications-menueditor.menu\n"); function DirEntry() = TopDirs() "" title() "\n" "" "alt" replacewith(tolower($section),"/ ","--") ".directory" "\n" "\n" "" "X-ALT" replacewith($section,"/ .","---") "\n" "\n"; #outputencoding="UTF-8"; supported; gnome = ; kde = ; x11 = ; text = ; endsupported; startmenu = "\n\n" DirEntry(); endmenu = BottomDirs() "\n"; submenutitle = ""; treewalk = "(M)"; rootsection = ""; genmenu = "applications.menu.new"; prerun = "rm -f " prefix()"/applications.menu.new"; postrun = "mv -f " prefix() "/applications.menu.new " prefix()"/applications.menu"; preoutput = "\n\n"; postoutput = ""; rootprefix = "/etc/xdg/menus-alt"; userprefix = ".config/menus-alt";