docs: revised linux desktop actions page (#26118)
This commit is contained in:
parent
4be10523e8
commit
e512669937
1 changed files with 14 additions and 10 deletions
|
@ -1,17 +1,21 @@
|
||||||
# Custom Linux Desktop Launcher Actions
|
# Custom Linux Desktop Launcher Actions
|
||||||
|
|
||||||
On many Linux environments, you can add custom entries to its launcher
|
## Overview
|
||||||
by modifying the `.desktop` file. For Canonical's Unity documentation,
|
|
||||||
see [Adding Shortcuts to a Launcher][unity-launcher]. For details on a
|
|
||||||
more generic implementation, see the [freedesktop.org Specification][spec].
|
|
||||||
|
|
||||||
__Launcher shortcuts of Audacious:__
|
On many Linux environments, you can add custom entries to the system launcher
|
||||||
|
by modifying the `.desktop` file. For Canonical's Unity documentation, see
|
||||||
|
[Adding Shortcuts to a Launcher][unity-launcher]. For details on a more generic
|
||||||
|
implementation, see the [freedesktop.org Specification][spec].
|
||||||
|
|
||||||
![audacious][audacious-launcher]
|
![audacious][audacious-launcher]
|
||||||
|
|
||||||
Generally speaking, shortcuts are added by providing a `Name` and `Exec`
|
> NOTE: The screenshot above is an example of launcher shortcuts in Audacious
|
||||||
property for each entry in the shortcuts menu. Unity will execute the
|
audio player
|
||||||
`Exec` field once clicked by the user. The format is as follows:
|
|
||||||
|
To create a shortcut, you need to provide `Name` and `Exec` properties for the
|
||||||
|
entry you want to add to the shortcut menu. Unity will execute the command
|
||||||
|
defined in the `Exec` field after the user clicked the shortcut menu item.
|
||||||
|
An example of the `.desktop` file may look as follows:
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||
Actions=PlayPause;Next;Previous
|
Actions=PlayPause;Next;Previous
|
||||||
|
@ -32,8 +36,8 @@ Exec=audacious -r
|
||||||
OnlyShowIn=Unity;
|
OnlyShowIn=Unity;
|
||||||
```
|
```
|
||||||
|
|
||||||
Unity's preferred way of telling your application what to do is to use
|
The preferred way for Unity to instruct your application on what to do is using
|
||||||
parameters. You can find these in your app in the global variable
|
parameters. You can find them in your application in the global variable
|
||||||
`process.argv`.
|
`process.argv`.
|
||||||
|
|
||||||
[unity-launcher]: https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles#Adding_shortcuts_to_a_launcher
|
[unity-launcher]: https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles#Adding_shortcuts_to_a_launcher
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue