"Fossies" - the Fresh Open Source Software Archive

Member "electron-4.2.12/docs/tutorial/linux-desktop-actions.md" (16 Oct 2019, 1364 Bytes) of package /linux/www/electron-4.2.12.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the last Fossies "Diffs" side-by-side code changes report for "linux-desktop-actions.md": 6.1.0_vs_7.0.0.

Custom Linux Desktop Launcher Actions

On many Linux environments, you can add custom entries to its launcher by modifying the .desktop file. For Canonical’s Unity documentation, see Adding Shortcuts to a Launcher. For details on a more generic implementation, see the freedesktop.org Specification.

Launcher shortcuts of Audacious:

audacious

Generally speaking, shortcuts are added by providing a Name and Exec property for each entry in the shortcuts menu. Unity will execute the Exec field once clicked by the user. The format is as follows:

Actions=PlayPause;Next;Previous

[Desktop Action PlayPause]
Name=Play-Pause
Exec=audacious -t
OnlyShowIn=Unity;

[Desktop Action Next]
Name=Next
Exec=audacious -f
OnlyShowIn=Unity;

[Desktop Action Previous]
Name=Previous
Exec=audacious -r
OnlyShowIn=Unity;

Unity’s preferred way of telling your application what to do is to use parameters. You can find these in your app in the global variable process.argv.