Documentation ¶
Index ¶
- Constants
- Variables
- func GetDBusObjectFromAppDesktop(desktop string, service string, path string) (dbus.ObjectPath, error)
- func SetDataDirs(dirs []string)
- func Walk(root string, walkFn WalkFunc)
- type AppsDir
- type DesktopAction
- type DesktopAppInfo
- func (ai *DesktopAppInfo) GetActions() []DesktopAction
- func (ai *DesktopAppInfo) GetCategories() []string
- func (ai *DesktopAppInfo) GetCommandline() string
- func (ai *DesktopAppInfo) GetComment() string
- func (ai *DesktopAppInfo) GetDBusActivatable() bool
- func (ai *DesktopAppInfo) GetDesktopOverrideExec() string
- func (ai *DesktopAppInfo) GetDisplayName() string
- func (ai *DesktopAppInfo) GetExecutable() string
- func (ai *DesktopAppInfo) GetFileName() string
- func (ai *DesktopAppInfo) GetGenericName() string
- func (ai *DesktopAppInfo) GetIcon() string
- func (ai *DesktopAppInfo) GetId() string
- func (ai *DesktopAppInfo) GetIsHidden() bool
- func (ai *DesktopAppInfo) GetIsHiden() bool
- func (ai *DesktopAppInfo) GetKeywords() []string
- func (ai *DesktopAppInfo) GetMimeTypes() []string
- func (ai *DesktopAppInfo) GetName() string
- func (ai *DesktopAppInfo) GetNoDisplay() bool
- func (ai *DesktopAppInfo) GetPath() string
- func (ai *DesktopAppInfo) GetShowIn(desktopEnvs []string) bool
- func (ai *DesktopAppInfo) GetStartupNotify() bool
- func (ai *DesktopAppInfo) GetStartupWMClass() string
- func (ai *DesktopAppInfo) GetTerminal() bool
- func (ai *DesktopAppInfo) GetTryExec() string
- func (ai *DesktopAppInfo) IsDesktopOverrideExecSet() bool
- func (ai *DesktopAppInfo) IsExecutableOk() bool
- func (ai *DesktopAppInfo) IsInstalled() bool
- func (ai *DesktopAppInfo) Launch(files []string, launchContext *appinfo.AppLaunchContext) error
- func (ai *DesktopAppInfo) SetDesktopOverrideExec(exec string)
- func (ai *DesktopAppInfo) ShouldShow() bool
- func (ai *DesktopAppInfo) StartCommand(files []string, launchContext *appinfo.AppLaunchContext) (*exec.Cmd, error)
- type ErrCharNotEscaped
- type ErrInvalidEscapeSequence
- type ErrReservedCharNotQuoted
- type WalkFunc
Constants ¶
View Source
const ( MainSection = "Desktop Entry" KeyType = "Type" KeyVersion = "Version" KeyName = "Name" KeyGenericName = "GenericName" KeyNoDisplay = "NoDisplay" KeyComment = "Comment" KeyIcon = "Icon" KeyHidden = "Hidden" KeyOnlyShowIn = "OnlyShowIn" KeyNotShowIn = "NotShowIn" KeyTryExec = "TryExec" KeyExec = "Exec" KeyPath = "Path" KeyTerminal = "Terminal" KeyMimeType = "MimeType" KeyCategories = "Categories" KeyKeywords = "Keywords" KeyStartupNotify = "StartupNotify" KeyStartupWMClass = "StartupWMClass" KeyURL = "URL" KeyActions = "Actions" KeyDBusActivatable = "DBusActivatable" TypeApplication = "Application" TypeLink = "Link" TypeDirectory = "Directory" )
Variables ¶
View Source
var ErrBadFieldCode = errors.New("bad field code")
View Source
var ErrEscapeCharAtEnd = errors.New("escape char \\ at end of string")
View Source
var ErrInvalidFileExt = errors.New("the file extension is not " + desktopExt)
View Source
var ErrInvalidFirstSection = errors.New("first section is not " + MainSection)
View Source
var ErrInvalidType = errors.New("type is not " + TypeApplication)
View Source
var ErrNoSpaceAfterQuoting = errors.New("no space character found after a quoting")
View Source
var ErrQuotingNotClosed = errors.New("quoting is not be closed")
Functions ¶
func SetDataDirs ¶
func SetDataDirs(dirs []string)
Types ¶
type DesktopAction ¶
type DesktopAction struct { Section string Name string Exec string // contains filtered or unexported fields }
func (*DesktopAction) Launch ¶
func (action *DesktopAction) Launch(files []string, launchContext *appinfo.AppLaunchContext) error
func (*DesktopAction) StartCommand ¶
func (action *DesktopAction) StartCommand(files []string, launchContext *appinfo.AppLaunchContext) (*exec.Cmd, error)
type DesktopAppInfo ¶
func GetAll ¶
func GetAll(skipDirs map[string][]string) []*DesktopAppInfo
func NewDesktopAppInfo ¶
func NewDesktopAppInfo(id string) *DesktopAppInfo
func NewDesktopAppInfoFromFile ¶
func NewDesktopAppInfoFromFile(filename string) (*DesktopAppInfo, error)
func NewDesktopAppInfoFromKeyFile ¶
func NewDesktopAppInfoFromKeyFile(kfile *keyfile.KeyFile) (*DesktopAppInfo, error)
func (*DesktopAppInfo) GetActions ¶
func (ai *DesktopAppInfo) GetActions() []DesktopAction
func (*DesktopAppInfo) GetCategories ¶
func (ai *DesktopAppInfo) GetCategories() []string
func (*DesktopAppInfo) GetCommandline ¶
func (ai *DesktopAppInfo) GetCommandline() string
func (*DesktopAppInfo) GetComment ¶
func (ai *DesktopAppInfo) GetComment() string
func (*DesktopAppInfo) GetDBusActivatable ¶
func (ai *DesktopAppInfo) GetDBusActivatable() bool
DBusActivatable is a boolean value specifying if D-Bus activation is supported for this application
func (*DesktopAppInfo) GetDesktopOverrideExec ¶
func (ai *DesktopAppInfo) GetDesktopOverrideExec() string
func (*DesktopAppInfo) GetDisplayName ¶
func (ai *DesktopAppInfo) GetDisplayName() string
func (*DesktopAppInfo) GetExecutable ¶
func (ai *DesktopAppInfo) GetExecutable() string
func (*DesktopAppInfo) GetFileName ¶
func (ai *DesktopAppInfo) GetFileName() string
func (*DesktopAppInfo) GetGenericName ¶
func (ai *DesktopAppInfo) GetGenericName() string
func (*DesktopAppInfo) GetIcon ¶
func (ai *DesktopAppInfo) GetIcon() string
func (*DesktopAppInfo) GetId ¶
func (ai *DesktopAppInfo) GetId() string
func (*DesktopAppInfo) GetIsHidden ¶
func (ai *DesktopAppInfo) GetIsHidden() bool
func (*DesktopAppInfo) GetKeywords ¶
func (ai *DesktopAppInfo) GetKeywords() []string
func (*DesktopAppInfo) GetMimeTypes ¶
func (ai *DesktopAppInfo) GetMimeTypes() []string
func (*DesktopAppInfo) GetName ¶
func (ai *DesktopAppInfo) GetName() string
func (*DesktopAppInfo) GetNoDisplay ¶
func (ai *DesktopAppInfo) GetNoDisplay() bool
func (*DesktopAppInfo) GetPath ¶
func (ai *DesktopAppInfo) GetPath() string
func (*DesktopAppInfo) GetShowIn ¶
func (ai *DesktopAppInfo) GetShowIn(desktopEnvs []string) bool
func (*DesktopAppInfo) GetStartupNotify ¶
func (ai *DesktopAppInfo) GetStartupNotify() bool
func (*DesktopAppInfo) GetStartupWMClass ¶
func (ai *DesktopAppInfo) GetStartupWMClass() string
func (*DesktopAppInfo) GetTerminal ¶
func (ai *DesktopAppInfo) GetTerminal() bool
func (*DesktopAppInfo) GetTryExec ¶
func (ai *DesktopAppInfo) GetTryExec() string
TryExec is Path to an executable file on disk used to determine if the program is actually installed
func (*DesktopAppInfo) IsDesktopOverrideExecSet ¶
func (ai *DesktopAppInfo) IsDesktopOverrideExecSet() bool
func (*DesktopAppInfo) IsExecutableOk ¶
func (ai *DesktopAppInfo) IsExecutableOk() bool
func (*DesktopAppInfo) IsInstalled ¶
func (ai *DesktopAppInfo) IsInstalled() bool
func (*DesktopAppInfo) Launch ¶
func (ai *DesktopAppInfo) Launch(files []string, launchContext *appinfo.AppLaunchContext) error
func (*DesktopAppInfo) SetDesktopOverrideExec ¶
func (ai *DesktopAppInfo) SetDesktopOverrideExec(exec string)
func (*DesktopAppInfo) ShouldShow ¶
func (ai *DesktopAppInfo) ShouldShow() bool
func (*DesktopAppInfo) StartCommand ¶
func (ai *DesktopAppInfo) StartCommand(files []string, launchContext *appinfo.AppLaunchContext) (*exec.Cmd, error)
type ErrCharNotEscaped ¶
type ErrCharNotEscaped struct {
Char byte
}
func (ErrCharNotEscaped) Error ¶
func (err ErrCharNotEscaped) Error() string
type ErrInvalidEscapeSequence ¶
type ErrInvalidEscapeSequence struct {
Char byte
}
func (ErrInvalidEscapeSequence) Error ¶
func (err ErrInvalidEscapeSequence) Error() string
type ErrReservedCharNotQuoted ¶
type ErrReservedCharNotQuoted struct {
Char byte
}
func (ErrReservedCharNotQuoted) Error ¶
func (err ErrReservedCharNotQuoted) Error() string
Click to show internal directories.
Click to hide internal directories.