1Password with Launch Center Pro's lists and prompt fallback

Most of the actions I post here end up with a permanent spot in my Launch Center Pro screen, however, there was one missing: related to 1Password. Searching via url scheme has been more enjoyable since in-app you have to scroll to the top to look for a new query. I speed things up adding my favorites to a Launch Center Pro list, with a [prompt] fallback so you can search for any term if unlisted.

lcpscreen2

The url to search in 1Password is straightforward:

onepassword://search/<search term>

There are plenty of services I recur often, such as Dropbox, Instapaper, Fastmail and Pinboard. Being able to set them quickly saves time when setting up integrations within iOS apps, such as Reeder and Outread. You open 1Password in the last window, you could be deep inside your secret stash and then have to go back just to look for a new term, also, you must scroll to the top to get the input. The way 1Password handles in-app searches is my only quibble and a convincing reason to automatize the process.

We start by setting our [list]:

onepassword://search/[list:Search 1Password|Dropbox|Fastmail|Instapaper|Pinboard]

But how to use a [prompt] as a fallback? If you just insert it as an item in the list, it will fail because Launch Center Pro will close the [list] using the bracket wrapping the [prompt]. We'll avoid this by cheating with the url encoding:

Search 1Password:

launchpro://?url=onepassword%3A%2F%2Fsearch%2F[[list:Search 1Password|Dropbox|Fastmail|Instapaper|Pinboard|Else?=%5Bprompt%5D]]

When you trigger this action, Launch Center Pro will resolve the list, notice how we use double brackets to avoid encoding the values, keep that in mind if you use a value with special characters. Since the value for our fallback is %5Bprompt%5D, LCP won't spot our request and will launch itself with the fully encoded url:

onepassword%3A%2F%2Fsearch%2F%5Bprompt%5D

Which is read as:

onepassword://search/[prompt]

You may notice the action is not as fast as you wish it could be and I can't point the reason for the delay, but it works and will keep your 1Password items only a couple of taps away from you.