shortcut

package
v0.1.620 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package shortcut puts magpie in the Start menu on Windows. There it is one portable exe with no installer, so nothing else would: each start of the desktop app points a Magpie shortcut in the user's Start menu at the exe it runs as, and Windows search finds it by that. Elsewhere it does nothing — the Mac has the app in Applications, Linux its own ways.

Index

Constants

View Source
const Name = "Magpie"

Name is what the shortcut is called, and what Windows search finds.

Variables

This section is empty.

Functions

func Ensure

func Ensure()

Ensure has the shortcut point at this magpie, when it doesn't yet. It fails quietly — magpie runs the same without one — and is skipped with MAGPIE_NO_SHORTCUT=1 (tests, sandboxes).

func Stale

func Stale(target, dir, exe string) bool

Stale reports whether a shortcut opening target in dir is not one for exe: there is none yet, or the exe was moved. Windows paths are the same in any case.

func Target

func Target(exe string) string

Target is what the shortcut opens for exe: exe itself, but for a magpie left running from where an update moved it aside, the exe in its place, which is what the next start runs. An update replaces the exe where it is, so the shortcut stays good through it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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