Documentation
¶
Index ¶
- Variables
- func AlertError(msg string) tea.Cmd
- func AlertInfo(msg string) tea.Cmd
- func AlertPersist(alertType, msg string) tea.Cmd
- func AlertWarn(msg string) tea.Cmd
- func Clamp(v, low, high int) int
- func CmdHandler(msg tea.Msg) tea.Cmd
- func ReportError(err error) tea.Cmd
- func ReportInfo(info string) tea.Cmd
- func ReportWarn(warn string) tea.Cmd
- type AlertMsg
- type ClearStatusMsg
- type InfoMsg
- type InfoType
Constants ¶
This section is empty.
Variables ¶
var CopyToClipboard = copyToClipboard
CopyToClipboard places text on the clipboard. It makes a best-effort call to the OS clipboard helper (xclip/xsel/wl-copy/pbcopy) AND always emits an OSC 52 escape sequence to the terminal. OSC 52 needs no helper binary and works over SSH and on Wayland sessions where those helpers are frequently absent (WezTerm, COSMIC Terminal, ...), which is why the OS-helper path alone failed silently. Returns false only for empty input.
It is a package variable, not a plain function, so callers that need to verify a copy happened (settings actions, tests) can swap in a fake without touching a real terminal or the OS clipboard.
Functions ¶
func AlertError ¶ added in v0.2.0
AlertError creates a bubbleup error overlay alert.
func AlertPersist ¶ added in v0.2.0
AlertPersist creates a persistent bubbleup alert that stays until Esc is pressed.
func ReportError ¶
func ReportInfo ¶
func ReportWarn ¶
Types ¶
type AlertMsg ¶ added in v0.2.0
type AlertMsg struct {
Type string // bubbleup alert key: "Info", "Warn", "Error"
Msg string
Persist bool // if true, alert stays until dismissed with Esc
}
AlertMsg triggers a bubbleup overlay alert instead of the status bar.
type ClearStatusMsg ¶
type ClearStatusMsg struct{}