Documentation
¶
Overview ¶
Package shortcut puts magpie in the Start menu on Windows. There it is one exe with no installer, so nothing else would: the first start of the desktop app makes a Magpie shortcut in the user's Start menu opening the exe it runs as, and Windows search finds it by that. It is made once: magpie remembers it did, and a shortcut the user deleted stays deleted (#508); one still there is pointed at the exe again when that was moved. A portable magpie (a data folder beside it) makes none and registers nothing, leaving no trace on the machine. Elsewhere it does nothing — the Mac has the app in Applications, Linux its own ways.
Index ¶
Constants ¶
const Name = "Magpie"
Name is what the shortcut is called, and what Windows search finds.
const StateName = "start-menu-shortcut"
StateName is the file in magpie's folder recording that the shortcut was made, and for which exe.
Variables ¶
This section is empty.
Functions ¶
func Ensure ¶
func Ensure()
Ensure makes the shortcut on the first start, keeps it pointed at this magpie after that while it is there, and never makes it again once the user deleted it. A portable magpie makes none. It fails quietly — magpie runs the same without one — and is skipped with MAGPIE_NO_SHORTCUT=1 (tests, sandboxes).
func Stale ¶
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.
Types ¶
This section is empty.