launchd

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 14 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 launchd installs ccswap's per-user LaunchAgent.

Index

Constants

View Source
const Label = "com.github.dudude-bit.ccswap"

Variables

View Source
var (
	Dir = ""
	Run = func(args ...string) ([]byte, error) {
		return exec.Command("/bin/launchctl", args...).CombinedOutput()
	}
)

Dir is the LaunchAgents directory ("" = ~/Library/LaunchAgents); Run is the launchctl seam.

Functions

func Install

func Install(binPath, home string) error

func Loaded

func Loaded() (bool, error)

Loaded reports whether launchd knows the job; a non-zero exit means not loaded.

func Plist

func Plist(binPath, home string) []byte

func ProgramPath

func ProgramPath() (string, error)

ProgramPath is the binary the installed LaunchAgent runs (ProgramArguments[0]).

func Refresh added in v0.2.0

func Refresh(bin string) (bool, error)

Refresh rewrites the installed LaunchAgent as this version writes it when it runs bin, keeping its program, log and environment, and reports whether it did; a plist edited beyond that stays as it is. Nothing is loaded or stopped: launchd reads the file when the job is next bootstrapped, at a login or by ccswap daemon install.

func Uninstall

func Uninstall() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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