Show specific extension only on specific apps

Is it possible to show specific extension only on specific apps? Some of my extensions are only useful within a certain app. Is there a way to choose for that?

1 Like

It is possible within the extension itself to hard code included/excluded apps but there is no user setting in PopClip to choose per-app extension rules. It’s been a popular request though. Thanks for the question and welcome to the forum @drukeinn

1 Like

Thanks @nick ! It’s this option described somewhere where you list resources on how to create your own extensions? I couldn’t find it.

It’s the excluded apps/required apps fields.

1 Like

An that cannot be achieved in Snippets, right? Not a developer here, so I’m out of my depth.

1 Like

It can be done in snippets sure, a snippet can do everything a regular extension can, except that it can’t contain any extra files. A quick example:

#popclip
name: Safari Only
required apps: [com.apple.Safari, com.apple.SafariTechnologyPreview]
javascript: popclip.showText("Hello Safari!")
1 Like

Ah, perfect, thanks!

Now, could you help me maybe finding the string for the Pages app? And where can I identify apps path (e.g. com.apple.Safari) in my system for any app I’m interested to set this up?

I’ve build some snippets already and PopClip is so useful!

1 Like

The bundle ID is contained within the Info.plist file within each application’s package (viewable using “Show Package Contents” in the right click menu).

HOWEVER…

I also have a BundleID PopClip extension (naturally :slightly_smiling_face:) which will show the bundle ID of the app you are selecting. (Clicking the button copies the string to clipboard.)

1 Like

Great stuff, got the extension and the ID. All work and all is good. I appreciated it, thanks.

1 Like