Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultFocusProtocol is the protocol used by the bundled focus helper.
DefaultFocusProtocol = "anfocus"
)
Variables ¶
This section is empty.
Functions ¶
func FindFocusHelper ¶
FindFocusHelper is only supported on Windows.
func FocusActivationArguments ¶
FocusActivationArguments formats the URI passed to WithActivationArguments.
func Push ¶
func Push(message string, opts ...NotificationOption) error
func RegisterFocusProtocol ¶
RegisterFocusProtocol is only supported on Windows.
Types ¶
type Audio ¶
type Audio string
const ( Basso Audio = "Basso" Blow Audio = "Blow" Bottle Audio = "Bottle" Frog Audio = "Frog" Funk Audio = "Funk" Glass Audio = "Glass" Hero Audio = "Hero" Morse Audio = "Morse" Ping Audio = "Ping" Pop Audio = "Pop" Purr Audio = "Purr" Sosumi Audio = "Sosumi" Submarine Audio = "Submarine" Tink Audio = "Tink" )
type FocusActivation ¶
FocusActivation describes the protocol activation data used to focus the source window when a Windows toast is clicked.
func PrepareFocusActivation ¶
func PrepareFocusActivation(_ int, _ ...string) (FocusActivation, error)
PrepareFocusActivation is only supported on Windows.
type NotificationOption ¶
type NotificationOption func(*notification)
func WithAudio ¶
func WithAudio(audio Audio) NotificationOption
WithAudio
The audio to play when displaying the notification
func WithMessage ¶
func WithMessage(msg string) NotificationOption
WithMessage
The single/multi line message to display for the notification.
func WithObjectiveC ¶
func WithObjectiveC(b ...bool) NotificationOption
func WithSubtitle ¶
func WithSubtitle(subtitle string) NotificationOption
func WithTitle ¶
func WithTitle(title string) NotificationOption
WithTitle
The main title/heading for the notification.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
toast-focus
command
toast-focus sends a Windows toast notification whose click action focuses the terminal window that launched this process.
|
toast-focus sends a Windows toast notification whose click action focuses the terminal window that launched this process. |
|
toast-focus-helper
command
toast-focus-helper is launched by the anfocus: protocol.
|
toast-focus-helper is launched by the anfocus: protocol. |
Click to show internal directories.
Click to hide internal directories.