func startSystray(shutdownHandler ShutdownHandler, faviconProvider FaviconProvider) {

	// Shows a small notification to inform that Stash will no longer show a terminal window,
	// and instead will be available in the tray. Will only show the first time a pre-desktop integration
	// system is started from a non-terminal method, e.g. double-clicking an icon.
	c := config.GetInstance()
	if c.GetShowOneTimeMovedNotification() {
		SendNotification("Stash has moved!", "Stash now runs in your tray, instead of a terminal window.")
		c.Set(config.ShowOneTimeMovedNotification, false)
		if err := c.Write(); err != nil {
			logger.Errorf("Error while writing configuration file: %s", err.Error())
		}
	}

	// Listen for changes to rerender systray
	// TODO: This is disabled for now. The systray package does not clean up all of its resources when Quit() is called.
	// TODO: This results in this only working once, or changes being ignored. Our fork of systray fixes a crash(!) on macOS here.
	// go func() {
	// 	for {
	// 		<-config.GetInstance().GetConfigUpdatesChannel()
	// 		systray.Quit()
	// 	}
	// }()

	for {
		systray.Run(func() {
			systrayInitialize(shutdownHandler, faviconProvider)
		}, nil)
	}
}
// MUST be run on the main goroutine or will have no effect on macOS
MUST be run on the main goroutine or will have no effect on macOS
// MUST be run on the main goroutine or will have no effect on macOS
func startSystray(shutdownHandler ShutdownHandler, faviconProvider FaviconProvider) {
	c := config.GetInstance()
	if c.GetShowOneTimeMovedNotification() {
		SendNotification("Stash has moved!", "Stash now runs in your tray, instead of a terminal window.")
		c.Set(config.ShowOneTimeMovedNotification, false)
		if err := c.Write(); err != nil {
			logger.Errorf("Error while writing configuration file: %s", err.Error())
		}
	}
	for {
		systray.Run(func() {
			systrayInitialize(shutdownHandler, faviconProvider)
		}, nil)
	}
}
func startSystray ( shutdownHandler ShutdownHandler , faviconProvider FaviconProvider ) { c := config . GetInstance ( ) if c . GetShowOneTimeMovedNotification ( ) { SendNotification ( " " , " " ) c . Set ( config . ShowOneTimeMovedNotification , false ) if err := c . Write ( ) ; err != nil { logger . Errorf ( " " , err . Error ( ) ) } } for { systray . Run ( func ( ) { systrayInitialize ( shutdownHandler , faviconProvider ) } , nil ) } }
MUST be run on the main goroutine or will have no effect on macOS
MUST be run on the main goroutine or will have no effect on macOS
// Shows a small notification to inform that Stash will no longer show a terminal window, // and instead will be available in the tray. Will only show the first time a pre-desktop integration // system is started from a non-terminal method, e.g. double-clicking an icon. // Listen for changes to rerender systray // TODO: This is disabled for now. The systray package does not clean up all of its resources when Quit() is called. // TODO: This results in this only working once, or changes being ignored. Our fork of systray fixes a crash(!) on macOS here. // go func() { // 	for { // 		<-config.GetInstance().GetConfigUpdatesChannel() // 		systray.Quit() // 	} // }()