I previously documented how to use KRunner to search with AI on Linux. I wanted that exact same frictionless workflow for Windows. By configuring a Windows PowerToys Command Palette AI search utilizing the WebSearchShortcut extension, you can set up custom aliases to instantly query any AI model directly from your desktop.
I specifically configure this to force these searches into specific browser profiles or incognito windows. I don’t like cluttering my primary AI account history with minor syntax checks or brief troubleshooting queries. By routing the command palette through a private window or utilizing temporary chat flags, I keep my main workspace clean while still getting instant answers.
Prerequisites and What You'll Need
Install the following utilities on your Windows machine:
- Microsoft PowerToys: Store Link
- WebSearchShortcut Extension: Store Link | GitHub Repository
Step 1: Enable Command Palette in PowerToys
- Open PowerToys: Launch the application from your system tray or Start menu.
- Navigate to Command Palette: Expand System Tools in the left sidebar and select Command Palette.
- Enable Module: Ensure the module is toggled On.
- Configure Shortcuts: Click on Settings. You can update the activation shortcut by clicking the pencil icon. The default is
Win + Space, but I map mine toAlt + Space. Save your configuration.
Step 2: Configure the WebSearchShortcut Extension
- In the PowerToys settings menu, click on Extensions from the left pane.
- Search for the WebSearchShortcut extension we installed.
- Toggle it On and click it to open its specific settings.
- You will see default search engines already configured. You can edit these; for instance, I changed Google's alias to
gand set the Alias activation to Indirect.
Step 3: Create the Custom Shortcut Trigger
To add various AI models efficiently, we need to expose the extension's shortcut creator.
- Inside the WebSearchShortcut settings, find the Add Search Shortcut option and click to expand it.
- Set the Alias to
create command. - Set Alias activation to Direct.
- Minimize the PowerToys settings window.
Step 4: Add Your Preferred AI Models
This is the core of the setup. You will need the specific search query URL for your chosen AI, using %s as the dynamic query variable.
AI Search Query Endpoints
- ChatGPT (Standard):
https://chatgpt.com/?q=%s - ChatGPT (Temporary Chat):
https://chatgpt.com/?q=%s&temporary-chat=true - Perplexity:
https://www.perplexity.ai/search?q=%s - Claude:
https://claude.ai/new?q=%s
To create the actual shortcut:
- Activate your command palette using
Alt + Space. - Type
create command. The extension window will instantly pop up. - Fill in the parameters. My configuration for a disposable ChatGPT session looks like this:
- Name: Temp gpt
- URL:
https://chatgpt.com/?q=%s&temporary-chat=true - Suggestion Provider: None
- Browser: Default (or specify an installed browser)
- Browser Arguments (optional):
--inprivate(for Edge) or--incognito(for Chrome/Brave)
- Click Save Search Shortcut.
Step 5: Assign the AI Activation Alias
- Maximize the PowerToys Command Palette settings window.
- Under the WebSearchShortcut extension, locate the Temp gpt shortcut we just created and expand it.
- Define an Alias to activate it (e.g.,
igpt). - Set the Alias activation to Indirect.
Testing the Workflow
Hit your activation keys (Alt + Space), type your alias (igpt), press the spacebar, and input your query: igpt how to reverse an array in python.
Reference: Browser Profile Flags
If you prefer to route AI searches to specific browser profiles rather than incognito mode, use the profile directory flags below in the Browser Arguments field.
| Browser | Incognito / Private Flag | Profile Flag |
|---|---|---|
| Chrome | --incognito |
--profile-directory="your profile name" |
| Edge | --inprivate |
--profile-directory="your profile name" |
| Firefox | --private-window |
-P "your profile name" |
| Brave | --incognito |
--profile-directory="your profile name" |
Conclusion: Summary & Next Steps
By leveraging PowerToys and the WebSearchShortcut extension, you've turned your Windows desktop into a high-speed AI workstation. This methodology isn't limited to AI—you can apply this to GitHub (https://github.com/search?q=%s) or StackOverflow (https://stackoverflow.com/search?q=%s) for an even more robust developer workflow.
