shell

package
v0.0.0-...-9a67539 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clipboard

func Clipboard() string

func IsShortcutRegistered

func IsShortcutRegistered(accelerator string) bool

func RegisterShortcut

func RegisterShortcut(accelerator string)

func SetClipboard

func SetClipboard(text string) bool

func ShowFilePicker

func ShowFilePicker(fd FileDialog) []string

func ShowMessage

func ShowMessage(msg MessageDialog) bool

func ShowNotification

func ShowNotification(n Notification)

func UnregisterAllShortcuts

func UnregisterAllShortcuts()

func UnregisterShortcut

func UnregisterShortcut(accelerator string) bool

Types

type FileDialog

type FileDialog struct {
	Title     string
	Directory string
	Filename  string
	Mode      string   // pickfile, pickfiles, pickfolder, savefile
	Filters   []string // each string is comma delimited (go,rs,toml) with optional label prefix (text:go,txt)
}

type MessageDialog

type MessageDialog struct {
	Title   string
	Body    string
	Level   string // info, warning, error
	Buttons string // ok, okcancel, yesno
}

type Notification

type Notification struct {
	Title    string
	Subtitle string // for MacOS only
	Body     string
}

Jump to

Keyboard shortcuts

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