Files
maCopy/docs/LAUNCH-AT-LOGIN.md
T
ilia d8090b251c
CI / skip-ci-check (pull_request) Successful in 4s
CI / secret-scan (pull_request) Successful in 3s
CI / node-ci (pull_request) Successful in 22s
Add clipboard-∞ tray icon, fix tray click, and Settings gear.
Ship a macOS template menu-bar glyph, only toggle on left mouse-down so
press/release no longer opens-then-closes, and put Settings next to Search
so it is reachable without the tray menu.
2026-09-04 22:04:37 -04:00

1.8 KiB
Raw Blame History

Launch at login (start when Mac loads)

maCopy can register itself as a macOS Login Item so it starts when you log in.

In the app (preferred)

  1. Build and install a real app bundle (dev mode often cannot register Login Items reliably):

    npm run tauri build
    open src-tauri/target/release/bundle/macos/maCopy.app
    
  2. Open Settings (gear next to Search in the picker, or tray menu → Settings…) → turn on Launch at login.

  3. Confirm in System Settings → GeneralLogin Items & Extensions → maCopy is listed.

Turning the toggle off removes the Login Item.

How it works

  • Settings UI calls @tauri-apps/plugin-autostart (enable / disable / isEnabled).
  • Preference is also stored in SQLite (launch_at_login) for display consistency.
  • Backend plugin is initialized with MacosLauncher::LaunchAgent.

Manual fallback

If the toggle fails:

  1. System Settings → General → Login Items → + → choose maCopy.app

  2. Or: right-click maCopy in the Dock (while open) → Options → Open at Login

  3. Or install a LaunchAgent (also restarts after crash/kill, but not after a normal Quit):

    ~/Library/LaunchAgents/macopy.plist/Applications/maCopy.app/Contents/MacOS/macopy
    with RunAtLoad + KeepAlive (SuccessfulExit = false).

Requirements for it to stick

Need Why
Installed .app under /Applications (or a stable path) Login Items point at a path; rebuilds under target/ get orphaned
Quit tauri dev when testing login Dont mix debug binary paths with the release app
Accessibility still granted after update Auto-paste needs Privacy → Accessibility → maCopy

Verify after reboot

  1. Restart Mac / log out and in
  2. Copy some text
  3. Press Ctrl+` — picker should appear without launching manually