ui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const SystrayIcon = "files/macos.png"

SystrayIcon is the icon in the menu bar.

Variables

This section is empty.

Functions

func Entry

func Entry(title, msg, val string) (string, bool, error)

Entry wraps a text-entry dialog.

func Error

func Error(title, msg string, args ...any) (bool, error)

Error wraps an error dialog.

func HasGUI

func HasGUI() bool

HasGUI returns false on Linux, true on Windows and optional on macOS.

func Info

func Info(title, msg string, args ...any) (bool, error)

Info wraps an info dialog.

func OpenCmd

func OpenCmd(cmd ...string) error

OpenCmd opens anything.

func OpenFile

func OpenFile(filePath string) error

OpenFile open Config Files.

func OpenLog

func OpenLog(logFile string) error

OpenLog opens Log Files.

func OpenURL

func OpenURL(url string) error

OpenURL opens URL Links.

func Password added in v1.0.0

func Password(title, msg string) (string, bool, error)

Password wraps a hidden-text entry dialog.

func Question

func Question(title string, defaultCancel bool, text string, args ...any) (bool, error)

Question wraps a question dialog.

func StartCmd

func StartCmd(c string, v ...string) error

StartCmd starts a command.

func Warning

func Warning(title, msg string) (bool, error)

Warning wraps a warning dialog.

Types

type MenuItem interface {
	Check()
	Checked() bool
	Disable()
	Disabled() bool
	Enable()
	Hide()
	SetIcon(iconBytes []byte)
	SetTemplateIcon(templateIconBytes []byte, regularIconBytes []byte)
	SetTitle(title string)
	SetTooltip(tooltip string)
	Show()
	String() string
	Uncheck()
	Clicked() chan struct{}
}

MenuItem is an interface to allow exposing menu items to operating systems that do not have a menu or a GUI.

func WrapMenu

func WrapMenu(m *systray.MenuItem) MenuItem

WrapMenu is just gross.

Jump to

Keyboard shortcuts

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