3 ms·
You can do similar stuff with Alfred, which happens to already be quite useful for frequent tasks. At least with Alfred 2, dunno about new versions. Create a wo
by aasasd 7y ago
You can do similar stuff with Alfred, which happens to already be quite useful for frequent tasks. At least with Alfred 2, dunno about new versions. Create a workflow, put in a single hotkey trigger block and choose for it to pop up Alfred's window with the selection and the cursor in the beginning. I'm using alt-shift-space as the key. Now you can select text, mash the hotkey and run any of the other workflows that have a ‘keyword’ assigned, plus have ‘script filters’ populate the result/tip list before anything is run. I'm using this to invoke search engines or to add notes in Org-mode, without bothering with the clipboard.
While I'm on this topic, let me add that Lua is way faster than Python or even JS, so it enhances the responsiveness if used for workflow scripts or ‘script filters’.
I'm also using the Automate app on Android to very similar ends: it can have your workflows invoked via the text selection menu or through sharing (no addons with more payment and embedded ads code necessary, like with Tasker).
- AriaMinaei 7y agoThank you for this. Been using Alfred for years and didn't know text selection could be fed to workflows.
- aasasd 7y agoSame here, actually: used Alfred for a long time, finally got fed up with juggling the clipboard just a couple months ago.
- aasasd 7y agoHowever, I just checked—Alfred does pollute the clipboard with the selection when invoked like that. I guess OSX doesn't have an API to fetch the selection, other than via the services or the clipboard (maybe it's for the better, in terms of security). IIRC some version of Keepass cleared passwords from the clipboard in such a way that even clipboard-history apps obeyed—but can't remember if this was in OSX or Linux. I wonder if this method could be used to pop the previous content back on the clipboard and leave no trace of the selection in the history.