Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HistoryPath ¶
func HistoryPath() string
HistoryPath is ~/.config/ttypedesk/palette_history.json
func LoadHistory ¶
LoadHistory reads recent palette queries (newest first).
Types ¶
type Env ¶
type Env struct {
Query string
Max int
Launch func(action string) error
OpenPath func(path string) error
Focus func(id string)
OpenFind func(query string)
Quit func()
Notify func(title, body string)
CopyText func(text string)
ApplyTheme func(id string) // theme pack id: xp, scarlet, bumble, bubble, sprout
// Confirm asks the user to confirm a dangerous recipe. Return false to abort.
// Implementations may keep the palette open for a second Enter.
Confirm func(prompt, action string) bool
Windows []Win
Icons []Icon
Programs []Program
Recipes []Recipe
History []string // recent queries, newest first
AsciiIcons bool // draw ASCII substitutes instead of emoji
}
Env is everything providers need from the desk (no UI).
type Program ¶
type Program struct {
ID, Name, Action, Icon string
}
Program is a user-registered launcher.
Click to show internal directories.
Click to hide internal directories.