systray

package
v0.0.0-...-a462190 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveCrashes

func RemoveCrashes()

RemoveCrashes removes the crash-reports from `logs` folder

Types

type Systray

type Systray struct {
	// Whether the Agent is in Pause mode
	Hibernate bool
	// The version of the Agent, displayed in the trayicon menu
	Version string
	// The url of the debug page. It's a function because it could change port
	DebugURL func() string
	// The active configuration file
	AdditionalConfig string
	// The path to the directory containing the configuration files
	ConfigDir *paths.Path
	// contains filtered or unexported fields
}

Systray manages the systray icon with its menu and actions. It also handles the pause/resume behaviour of the agent

func (*Systray) Pause

func (s *Systray) Pause()

Pause restarts the program with the hibernate flag set to true

func (*Systray) Quit

func (s *Systray) Quit()

Quit simply exits the program

func (*Systray) Restart

func (s *Systray) Restart()

Restart restarts the program it works by finding the executable path and launching it before quitting

func (*Systray) RestartWith

func (s *Systray) RestartWith(path string)

RestartWith restarts the program with the given path

func (*Systray) Resume

func (s *Systray) Resume()

Resume restarts the program with the hibernate flag set to false

func (*Systray) SetCurrentConfigFile

func (s *Systray) SetCurrentConfigFile(configPath *paths.Path)

SetCurrentConfigFile allows to specify the path of the configuration file the agent is using. The tray menu with this info can display an "open config file" option.

func (*Systray) Start

func (s *Systray) Start()

Start sets up the systray icon with its menus

Jump to

Keyboard shortcuts

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