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

Folder Support #1

Open
kotfu opened this issue Jun 20, 2021 · 1 comment
Open

Folder Support #1

kotfu opened this issue Jun 20, 2021 · 1 comment

Comments

@kotfu
Copy link

kotfu commented Jun 20, 2021

Thanks for building this tool to access macOS services from within Alfred, it's very useful to me. However, it doesn't seem to work if I select a folder instead of a file. For example, I use iTerm2, which provides a system service to open a new iTerm2 window at the given folder. To use this from finder, right click on a folder, then click Services, and then I see a list of services, including one called "New iTerm2 Window Here".

When I find a folder in Alfred, then invoice the "macOS Services" action provided by this workflow, the list of services available to me in Alfred does not include the "New iTerm2 Window Here" service.

I code a bit, but not in Objective-C or Go. I poked around in the files included in this workflow, and I can see in PathsToPasteboard.js that you set the content type of the pasteboard to public.file-url, which I don't think includes folders. In an attempt to make this work myself, I tried editing PathsToPasteboard.js so the content type was public.folder but that still didn't make the embedded alfred-services binary return services that apply to folders (like "New iTerm2 Window Here". I looked at the alfred debugging log, and poked around in main.go, and I'm not smart enough to figure out where the problem is.

@deanishe
Copy link
Owner

deanishe commented Nov 6, 2021

PathsToPasteboard.js is only run from the Alfred File Action, where there isn't much information about the files available (Alfred throws most of it away).

Try using the "current selection" (or "clipboard contents") Hotkey instead of the File Action. They should put a lot more information on the clipboard, and a lot more macOS services should be available as a result.

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

No branches or pull requests

2 participants