Skip to content

About

One tap on your Supernote puts the current page on your Mac's clipboard. Supernote plugin + macOS menu-bar app, over local Wi-Fi.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Send to Mac icon

Send to Mac for Supernote

Tap one button on your Supernote and the page you're looking at lands on your Mac's clipboard. Then press ⌘V in Slack, Notion, Keynote, Mail, or anywhere else.

Nothing goes through a cloud service. The page travels over your own Wi-Fi from the Supernote straight to a small menu-bar app on the Mac.

Status: early (v0.1). Works end to end on the author's Supernote and Mac, but hasn't been tried on many devices yet. Bug reports are very welcome.

What it does

  • Send page to Mac: a toolbar button in Notes and Documents. It exports the current page as a PNG on a white background and puts it on the Mac clipboard. In Documents, highlights and underlines are kept.
  • The Mac app sits in the menu bar, accepts pages only from Supernotes you've paired, and shows a notification when one arrives. It can also save a copy of each page to ~/Pictures/Send to Mac (on by default).
  • Pairing happens once: the first time you tap the button, a dialog pops up on your Mac asking you to allow your Supernote.
  • IP address changes are handled for you. If your router gives the Mac a new address, the plugin finds it again on its own.

Why not AirDrop?

AirDrop uses Apple's private wireless protocol, and Supernotes don't have it. LocalSend-based plugins (such as Notipal) can send files to a Mac, but the file lands in a folder, and you still have to find it and drag it where you want it. This app goes straight to the clipboard: tap, then ⌘V.

Install

You need a Supernote with plugin support (Chauvet firmware with Settings › Apps › Plugins), a Mac running macOS 13 or later, and both on the same Wi-Fi network.

1. Mac app

  1. Download Send.to.Mac.zip from Releases, unzip it, and move Send to Mac.app to Applications.
  2. Open it. The app isn't notarized yet, so the first time, right-click it, choose Open, then click Open again.
  3. A ⬇︎ icon appears in the menu bar. Its menu shows the address the Mac is listening on. To start it automatically, turn on Open at Login in that menu.

2. Supernote plugin

  1. Download SendToMac.snplg from Releases.
  2. Connect the Supernote by USB (or use Supernote Partner or Browse & Access) and copy the file into its MyStyle folder.
  3. On the Supernote, go to Settings › Apps › Plugins › Add Plugin and pick SendToMac.snplg.

3. First send

  1. Open any note and tap Send page to Mac in the toolbar.
  2. Allow network access and file access when the Supernote asks.
  3. Click Allow on the Mac when it asks to pair.
  4. The page is now on your clipboard. Press ⌘V.

If the plugin can't find your Mac (some routers block devices on Wi-Fi from seeing each other), tap the gear next to the plugin in Settings › Apps › Plugins and type in the address shown in the Mac app's menu.

How it works

Supernote                                          Mac
┌──────────────────────────────┐   Wi-Fi (HTTP)   ┌─────────────────────────┐
│ toolbar button               │                  │ Send to Mac.app         │
│  → saveCurrentNote           │  POST /clip      │  → check pairing token  │
│  → generateNotePng / DocImage├─────────────────►│  → NSPasteboard (PNG)   │
│  → MacLink (Java, raw socket)│   image/png      │  → notification         │
└──────────────────────────────┘                  └─────────────────────────┘
  • Plugin: a React Native plugin built on Ratta's official sn-plugin-lib SDK. The Supernote plugin host blocks unencrypted HTTP in fetch, so a small Java module (MacLink) sends requests over a raw socket instead. The same module also searches the Wi-Fi subnet for the Mac.

  • Mac app: a single Swift file with no dependencies. It runs an HTTP listener on port 8766 using Network.framework.

  • Protocol:

    Request Response
    GET /hello {app, version, id, name, paired}
    POST /pair {device} {token, name}, sent only after you click Allow on the Mac
    POST /clip with header X-SendToMac-Token and body image/png or text/plain {ok: true}

Security notes

  • Only paired devices can write to your clipboard. Each pairing gets a random 256-bit token. Revoke one with Forget … in the menu.
  • Traffic isn't encrypted, so it's only as private as your Wi-Fi. Avoid using it on public networks.
  • The Mac app listens on all network interfaces at port 8766.

Build from source

Requirements: macOS, Node 18 or later, and the Xcode command-line tools.

# Mac app → mac-receiver/build/Send to Mac.app
./mac-receiver/build-app.sh

# Supernote plugin → dist/SendToMac.snplg
./scripts/setup-toolchain.sh   # one-time: JDK 17 + Android SDK, stored in ~/.cache, nothing installed system-wide
./scripts/build-plugin.sh

Plugin code is in supernote-plugin/. The files worth knowing:

  • index.js: registers the buttons.
  • src/sendPage.ts: the send flow.
  • src/exportPage.ts: page export.
  • src/mac.ts: the Mac protocol, discovery, and pairing.
  • android/.../MacLinkModule.java: the native networking module.

Roadmap

  • Send the whole page (Notes and Documents)
  • Send a lasso selection as an image
  • Send a lasso selection as recognized text (recognizeElements), so handwriting becomes pasteable text
  • Send selected text from a document
  • Notarized Mac app and a Homebrew cask
  • Windows and Linux receivers

Credits

  • Raw-socket HTTP approach and toolchain script adapted from Supernote Clipboard by Hong-Sheng Zheng (MIT), which handles the other direction (Mac → Supernote).
  • Built on Ratta's Supernote plugin SDK.

Not affiliated with or endorsed by Ratta or Supernote.

License

MIT

About

One tap on your Supernote puts the current page on your Mac's clipboard. Supernote plugin + macOS menu-bar app, over local Wi-Fi.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages