Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow single keyword to access a favorite directly #13

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bdimaggio
Copy link

@bdimaggio bdimaggio commented Oct 13, 2024

In issue 12, there's a request for "have an Alfred command to take us directly to a favourite." This patch allows that. Usage:

  1. Copy the "atabs" script filter.
  2. Change its keyword to whatever you want your single keyword to be (e.g. I used "gcal" for my Google Calendar favorite).
  3. Change its Placeholder Title if you want (not really necessary, as this gets replaced quickly by the search result).
  4. In the "script" field after ./list-tabs.js, add a space, then 'topApp', and then the URL of the favorite you want. Note that the logic just looks at the favorite's domain, because the specific URLs of the most common favorites, like Gmail or Google Calendar, are very changeable — I figured that only the domain is consistent. For example:
    ./list-tabs.js topApp https://calendar.google.com/calendar/u/0/r/week
  5. Connect your new script filter to the same Args and Vars filter that the "atabs" one connects to.

For example, here's my setup with Google Calendar and GMail script filters:
image

Now you should be able to simply enter, for example, "gcal" and see only your Google Calendar suggested.

Note that this approach removes the unused excludeLocations argument in favor of a specific favorite domain. Leaves excludeLocations alone! (I now understand that it is used, and how 😄 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant