diff --git a/cmd/systray/logo.go b/client/systray/logo.go similarity index 99% rename from cmd/systray/logo.go rename to client/systray/logo.go index de60bcdbd..857a8a937 100644 --- a/cmd/systray/logo.go +++ b/client/systray/logo.go @@ -3,7 +3,7 @@ //go:build cgo || !darwin -package main +package systray import ( "bytes" diff --git a/cmd/systray/systray.go b/client/systray/systray.go similarity index 99% rename from cmd/systray/systray.go rename to client/systray/systray.go index 7da83a7ea..782fc5420 100644 --- a/cmd/systray/systray.go +++ b/client/systray/systray.go @@ -3,8 +3,8 @@ //go:build cgo || !darwin -// The systray command is a minimal Tailscale systray application for Linux. -package main +// Package systray provides a minimal Tailscale systray application. +package systray import ( "context" @@ -44,8 +44,8 @@ var ( hideMullvadCities bool ) -func main() { - menu := new(Menu) +// Run starts the systray menu and blocks until the menu exits. +func (menu *Menu) Run() { menu.updateState() // exit cleanly on SIGINT and SIGTERM