Skip to content
/ deskgen Public

Generate .desktop and .directory files following the Desktop Entry Specification

License

Notifications You must be signed in to change notification settings

var512/deskgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deskgen

Generate .desktop and .directory files following the Desktop Entry Specification.

Go

This is my first Go project. Only what I currently need from the specification was implemented. Use at your own risk.

Related projects

Installation

go get -u github.com/var512/deskgen/cmd/deskgen

Usage

Options

${GOPATH}/bin/deskgen --help

Stdout

${GOPATH}/bin/deskgen \
    --type="Application" \
    --name="My script" \
    --genericName="Custom script" \
    --comment="A custom script" \
    --icon="applications-utilities" \
    --exec="my-script.sh" \
    --mimeType="inode/directory;text/html;" \
    --categories="Utility;" \
    --keywords="Internet;Development;" \
    --startupNotify="true"

Save to disk

If filePath is not provided the file will be saved in the current working directory.

${GOPATH}/bin/deskgen \
    --fileName="my-script" \
    --filePath "/home/user/.local/share/applications" \
    --type="Application" \
    --name="My script" \
    --genericName="Custom script" \
    --comment="A custom script" \
    --icon="applications-utilities" \
    --exec="my-script.sh" \
    --mimeType="inode/directory;text/html;" \
    --categories="Utility;" \
    --keywords="Internet;Development;" \
    --startupNotify="true"

Actions

Very basic functionality. Each action requires all values to be set (name, icon, exec).

${GOPATH}/bin/deskgen \
    --type="Application" \
    --name="My script" \
    --actionName="Example 1" \
    --actionIcon="" \
    --actionExec="" \
    --actionName="Example 2" \
    --actionIcon="arrow-right" \
    --actionExec="" \
    --actionName="New Private Window" \
    --actionIcon="icon-private" \
    --actionExec='/bin/example --new-private-window --with="double-quotes" %u'

About

Generate .desktop and .directory files following the Desktop Entry Specification

Topics

Resources

License

Stars

Watchers

Forks

Languages