Skip to content

Instantly share code, notes, and snippets.

@pilotmoon
Last active May 28, 2024 20:41
Show Gist options
  • Save pilotmoon/bd2e75750f4cfbedf832192eeb762c7f to your computer and use it in GitHub Desktop.
Save pilotmoon/bd2e75750f4cfbedf832192eeb762c7f to your computer and use it in GitHub Desktop.
// #popclip extension snippet to send text to Raycast
// name: Raycast
// identifier: com.pilotmoon.popclip.extension.raycast
// description: Activate Raycast with the selected text.
// icon: iconify:simple-icons:raycast
// app: { name: Raycast, link: https://www.raycast.com/ }
// language: javascript
popclip.performCommand("copy");
popclip.openUrl("raycast://");
util.sleep(100);
popclip.pressKey("command V");

Raycast

Activate Raycast and paste in the selected text.

  • Author: Nick Moore
  • Icon: raycast by Simple Icons (CC0)

I couldn't find a programattic way to pop open Raycast with provided text. So I'm just pressing opening raycast:// to pop it open, wait 100 milliseconds, then press ⌘V.

Changelog

  • 14 May 2024: Initial release
@pilotmoon
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment