This is a but.sh template for creating .desktop files, which are used for menu entries and links in most Linux desktop environments. Built against the specification
This, of course, requires but.sh
The template itself requires only bash and gnu-coreutils.
ENTRY_TYPE
-- one ofApplication
,Link
, orDirectory
ENTRY_NAME
-- intended nameENTRY_URL*
-- the URL that theLink
should point to- * required only for
Link
type
- * required only for
ENTRY_VERSION
-- the version of the desktop entry specification that this implementsENTRY_GENERIC_NAME
-- generic name (eg. "Web Browser" or "Mail Client")ENTRY_NAME_<locale>
-- intended name for the given localeENTRY_GENERIC_NAME_<locale>
-- generic name for the given localeENTRY_NO_DISPLAY
-- boolean value that determines whether the entry is displayed in menus.ENTRY_COMMENT
--ENTRY_COMMENT_<locale>
--ENTRY_ICON
--ENTRY_ICON_<locale>
--ENTRY_HIDDEN
--ENTRY_ONLY_SHOW_IN
--ENTRY_NOT_SHOW_IN
--ENTRY_DBUS_ACTIVATABLE
--ENTRY_TRY_EXEC
--ENTRY_EXEC
--ENTRY_PATH
--ENTRY_TERMINAL
--ENTRY_ACTIONS
--ENTRY_MIME_TYPE
--ENTRY_CATEGORIES
--ENTRY_IMPLEMENTS
--ENTRY_KEYWORDS
--ENTRY_KEYWORDS_<locale>
--ENTRY_STARTUP_NOTIFY
--ENTRY_STARTUP_WM_CLASS
--
wget https://gist.github.com/nealian/0b541c010372f9e638e8500381e5791e/raw/desktop.buttemplate{,.functions}
but.sh desktop.buttemplate -c desktop.buttemplate.functions -c app.environment -o /usr/share/applications/app.desktop