autostart

package
v0.1.4607 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 8 Imported by: 0 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

Overview

Package autostart opens magpie when the user logs in, in the tray with no window, so the gateway every agent is pointed at is there from the start. Whether it does is the system's own record — a launch agent on the Mac, a Run value on Windows, an autostart entry on Linux — not a setting of magpie's, so it can't say one thing while the system does another.

Index

Constants

View Source
const Arg = "tray"

Arg is what magpie is started with at login: the tray, no window.

View Source
const LoginItemsURL = "x-apple.systempreferences:com.apple.LoginItems-Settings.extension"

LoginItemsURL opens System Settings' Login Items pane, where a record that NeedsAllowing is allowed again.

Variables

This section is empty.

Functions

func Refresh added in v0.1.586

func Refresh() error

Refresh brings the system's record up to date when magpie opens at login, for a record an older version wrote; it never turns it on.

func Repoint added in v0.1.2133

func Repoint(from, to string) error

Repoint has the record that opens magpie at login open to instead, when it opens from: the Windows app installed itself from where it was downloaded (update.Settle). Nothing else in it changes, so a record the user switched off in Task Manager stays off, and none is made when there was none.

func Set

func Set(on bool) error

Set has magpie open at login, or not, as this copy of it; on Linux, where a package's own autostart entry starts magpie, as that package's.

Types

type State added in v0.1.1295

type State string

State is whether magpie opens at login, as the system will act on it.

const (
	// Off: no record, so nothing opens magpie at login.
	Off State = "off"
	// On: the record is there, and nothing the system says holds it back.
	On State = "on"
	// NeedsAllowing: the record is there, but the user switched it off in
	// the system's own settings (on the Mac, System Settings › General ›
	// Login Items › Allow in the Background), so it opens nothing until
	// it is allowed there again; writing the record anew doesn't do that.
	NeedsAllowing State = "allow"
)

func Enabled

func Enabled() State

Enabled reports whether magpie opens at login. A system that can't be asked, or that answers something else, is not taken for a no: the record's own word stands (On).

Jump to

Keyboard shortcuts

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