An Alfred workflow that lets you search for links and images with Google Custom Search directly from your clipboard and paste the results instantly.
- LuckyPaste: Quickly fetches the first Google search result link for a given query.
- LuckyPic: Retrieves the first image result for a given query and saves it to a temporary directory.
Before you start using LuckyPaste, you need to have:
- Alfred 4 with a Powerpack license.
- Python 3 installed on your macOS.
- A Google Custom Search Engine (CSE) created and an API key obtained from the Google Developer Console.
- Clone this repository or download the workflow file.
- Add the workflow to Alfred.
- Set the following environment variables in the workflow:
API_KEY
: Your Google API key.CX
: The custom search engine ID for your Google CSE.
- Select text anywhere on your Mac.
- Use the assigned hotkey or Alfred keyword to trigger the workflow.
- The workflow will search Google with the selected text and paste the first result's URL.
- Select text anywhere on your Mac.
- Use the assigned hotkey or Alfred keyword to trigger the workflow.
- The workflow will search Google Images with the selected text.
- The first image result will be downloaded to
~/AlfredTemp
.
You can customize the workflow by changing the hotkeys, keywords, and modifying the scripts to adjust the behavior as per your needs.
Contributions are welcome. Please fork the repository and submit a pull request with your enhancements.
Distributed under the MIT License. See LICENSE
for more information.
The above README provides an overview of the Alfred workflow, its features, prerequisites, setup instructions, and usage details. It also mentions the ability to customize the workflow, how to contribute to its development, and the type of license it's distributed under. The actual Python scripts are referenced but not included in the README, assuming they will be viewable within the repository itself.