appie

package module
v0.0.0-...-22db4d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2025 License: BSD-3-Clause Imports: 16 Imported by: 1

README

Appie

A Go library for getting information about apps and launching them.

Supported systems:

  • Linux
  • macOS

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FdoLookupIconPath

func FdoLookupIconPath(theme string, size int, iconName string) string

FdoLookupIconPath will take the name of an icon and find a matching image file

func FdoLookupIconPathInTheme

func FdoLookupIconPathInTheme(iconSize string, dir string, parentDir string, iconName string) string

FdoLookupIconPathInTheme searches icon locations to find a match using a provided theme directory. The dir path is the root of the theme, parentDir is used to look up inherited themes

Types

type AppData

type AppData interface {
	Name() string       // Name is the name of the app usually
	Run([]string) error // Run is the command to run the app, passing any environment variables to be set

	Categories() []string                      // Categories is a list of categories that the app fits in (platform specific)
	Hidden() bool                              // Hidden specifies whether instances of this app should be hidden
	Icon(theme string, size int) fyne.Resource // Icon returns an icon for the app in the requested theme and size
	MimeTypes() []string                       // MimeTypes returns a list of mimetypes that this application can handle

	Source() *AppSource // Source will return the location of the app source code from metadata, if known
}

AppData is an interface for accessing information about application icons

type AppSource

type AppSource struct {
	Repo, Dir string
}

AppSource represents the source code information of an application

type Provider

type Provider interface {
	AvailableApps() []AppData
	AvailableThemes() []string
	FindAppFromName(appName string) AppData
	FindAppsMatching(pattern string) []AppData
	DefaultApps() []AppData
	CategorizedApps() map[string][]AppData
}

Provider describes a type that can locate icons and applications for the current system

func NewFDOProvider

func NewFDOProvider() Provider

NewFDOProvider returns a new application provider following the FreeDesktop.org specifications

func NewMacOSProvider

func NewMacOSProvider() Provider

NewMacOSProvider creates an instance of a Provider that can find and decode macOS apps

func SystemProvider

func SystemProvider() Provider

SystemProvider returns an application provider for the current system. for macOS systems it will be a macOSProvider, for Linux/Unix it will be an FDOProvider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL