Skip to content

hamao0820/puretray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

puretray

puretray is a port of getlantern/systray implemented with ebitengine/purego, without using cgo.

Features

  • Supported on macOS(Darwin) only (Windows and Linux are not supported yet)
  • Menu items can be checked and/or disabled
  • Most functions may be called from any goroutine

API

purego API is almost the same as getlantern/systray. Please refer to the original documentation.

func main() {
	puretray.Run(onReady, onExit)
}

func onReady() {
	puretray.SetIcon(icon)
	puretray.SetTitle("Awesome App in Pure Go")
	puretray.SetTooltip("Pretty awesome超级棒")
	mQuit := puretray.AddMenuItem("Quit", "Quit the whole app")

	// Sets the icon of a menu item. Only available on Mac and Windows.
	mQuit.SetIcon(icon)
}

func onExit() {
	// clean up here
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages