Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DesktopEntry ¶
type DesktopEntry struct { Filename string Name string Icon string Exec string SnapInstanceName string SnapAppName string Hidden bool OnlyShowIn []string NotShownIn []string GnomeAutostartEnabled bool Actions map[string]*Action }
DesktopEntry represents a freedesktop.org desktop entry file.
The various fields are as defined in the specification: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
func (*DesktopEntry) ExpandActionExec ¶
func (de *DesktopEntry) ExpandActionExec(action string, uris []string) ([]string, error)
ExpandActionExec returns the command line used to launch the named action of the desktop entry.
func (*DesktopEntry) ExpandExec ¶
func (de *DesktopEntry) ExpandExec(uris []string) ([]string, error)
ExpandExec returns the command line used to launch this desktop entry.
Macros will be expanded, with the %f, %F, %u, and %U macros using the provided list of URIs
func (*DesktopEntry) ShouldAutostart ¶
func (de *DesktopEntry) ShouldAutostart(currentDesktop []string) bool
ShouldAutostart returns true if this desktop file should autostart on the given desktop.
currentDesktop is the value of $XDG_CURRENT_DESKTOP split on colon characters.