Documentation ¶
Index ¶
- Constants
- Variables
- func CloseInput()
- func DesktopEntries(c *Config) ([]*desktop.Entry, []string, error)
- func FilterEntries()
- func HandleInput(u InputUpdateHandler)
- func LoadEntries(c *Config)
- func MatchEntry(i int) bool
- func Run(config *Config, execute string, path string, runInTerminal bool, ...) error
- func SetInput(i string)
- func SharedInit(c *Config)
- func Sort(i, j int) bool
- func SortEmpty(i, j int) bool
- func SortFiltered(i, j int) bool
- type Config
- type InputUpdateHandler
- type ListEntry
Constants ¶
const VersionInfo = `` /* 165-byte string literal not displayed */
VersionInfo is the text printed when the --version flag is supplied.
Variables ¶
var ( // Entries is a slice of all desktop entries. Entries []*desktop.Entry // Names is a slice of all desktop entry names. Names []string // FilteredEntries is a slice of filtered desktop entries. FilteredEntries []*ListEntry )
var Version = "0.0.0"
Version is the version of the application.
Functions ¶
func DesktopEntries ¶
DesktopEntries scans for desktop entries.
func FilterEntries ¶
func FilterEntries()
FilterEntries sets FilteredEntries to all entries matching the input buffer.
func HandleInput ¶
func HandleInput(u InputUpdateHandler)
HandleInput is a goroutine which reads changes in the input buffer and calls the supplied InputUpdateHandler.
func MatchEntry ¶
MatchEntry returns whether the entry at the supplied index matches the input buffer.
func Run ¶
func Run(config *Config, execute string, path string, runInTerminal bool, waitUntilFinished bool) error
Run executes the specified command.
func SharedInit ¶
func SharedInit(c *Config)
SharedInit performs any necessary initialization shared between gmenu and gtkmenu.
func SortEmpty ¶
SortEmpty returns whether entry i should be sorted before entry j when the input buffer is blank.
func SortFiltered ¶
SortFiltered returns whether entry i should be sorted before entry j when the input buffer is not blank.
Types ¶
type Config ¶
type Config struct { PrintVersion bool DataDirs string HideGenericNames bool HideAppDetails bool // contains filtered or unexported fields }
Config stores configuration variables.
func (*Config) BrowserCommand ¶
BrowserCommand returns the command to execute to open a browser.
func (*Config) TerminalCommand ¶
TerminalCommand returns the command to execute to open a terminal.
type InputUpdateHandler ¶
type InputUpdateHandler func(input string)
InputUpdateHandler is a handler to be executed when the input is updated.