noccylabs/desktopfile

$ git tag
0.1.0

$ git branch
* master

NoccyLabs / DesktopFile

Usage

Warning: You should not use this to modify existing shortcuts on your system, although you can. Doing so may discard unsupported parts of these shortcuts such as localized titles and comments. Only use this library with shortcuts that you have generated, possibly with this library :)

Ex 1: Create shortcut

use NoccyLabs\DesktopFile\DesktopFile;

DesktopFile::create(DesktopFile::TYPE_APPLICATION)
    ->setName("My Awesome App")
    ->setExec("/usr/bin/awesomeapp")
    ->setIcon("/usr/share/icons/awesomeapp.png")
    ->write("awesomeapp.desktop");