PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

[Run] Add option for custom locations, custom commands, workflow

Open karthikvinayan opened this issue 5 years ago • 32 comments

Hi,

First of all let me say I absolutely love PowerToys and use it on a daily basis. The new app launcher is great and since it works more smoothly and lag free for me compared to other third-party programs is what attracted me to it. But the only thing, at least in my workflow, is the ability to create custom commands.

For example, a custom command to open a specific file or a folder (which is not within the Users folder, or is hidden), will make a monumental change in my workflow.

karthikvinayan avatar May 23 '20 13:05 karthikvinayan

+1

SRGDamia1 avatar Jun 19 '20 15:06 SRGDamia1

I would like to add to add to this and say that this ability ( to execute a file with a command) will do a massive its is made to work in tandem with programs like AutoHotKey (basically enabling the user to do anything possible) or even with automate tasks with Python

karthikvinayan avatar Jul 01 '20 13:07 karthikvinayan

@crutkas Is it available? \o/

ayr-ton avatar Oct 28 '21 19:10 ayr-ton

+1 on this request.. This will take the usefulness of PowerToys Run to another level.

Any updates on whether this is being considered / where it is in the stack of upcoming features?

TheethumNandrum avatar May 06 '22 18:05 TheethumNandrum

It would be cool if you could not only re-map shortcuts in the keyboard manager, but also "create" them. I could add win + t (or alternatively ctrl + alt + t) to execute the wt command, and quickly open a new terminal. Much like most of the Linux desktop environments allow.

Elias-Graf avatar May 10 '22 14:05 Elias-Graf

I feel like https://github.com/microsoft/PowerToys/issues/15032 is the same ask as this and should be merged in to this item

crutkas avatar May 10 '22 18:05 crutkas

  • 1 on this feature. whould be awesome

ParadiseFallen avatar May 24 '22 10:05 ParadiseFallen

+1 on this!

mateialexandru avatar May 30 '22 22:05 mateialexandru

+1! Would love to see similar functionality as to what can be achieved with Alfred Workflows

tomcheah avatar Jun 05 '22 18:06 tomcheah

This is a feature that I would love very much. In this moment I use Ueli instead of PowerToys just for this reason. I have many shortcuts to certain paths in my nas and external drives and this functionality is too important for me. Sometimes I reactivate PowerToys to check if this feature has been implemented but till now I have no luck... I hope this will be implemented soon... :)

globdug avatar Jul 18 '22 07:07 globdug

+1, in Wox I only use the functionality to run shortcuts for a certain directory. In that way, it is possible to run any command I like. I would love to see this feature in the program plugin to scan a given folder filtered on given extensions.

yveslaurentcreton avatar Jul 26 '22 07:07 yveslaurentcreton

+1 the only reason I currently use Executor instead of PowerToys Run is exactly this: I can create my custom commands/scripts in python or js and run them passing options from the launcher

dlordi avatar Sep 08 '22 13:09 dlordi

I was able to leverage the existing functionalities of Run to achieve these custom commands workflow. So, what I basically did is

  1. Add a folder where you can store all your .bat scripts. Say E:\Snippets in Environment Variables => System Variables => Double click Path => New
    image
  2. Then create a new file in that path. Let's call it, coderag.bat
  3. I have a custom command which opens up my neovim config file in command prompt. You can pretty much write any workflow that you want in that .bat file. Mine goes like this
config = cd /d C:\Users\vishn\AppData\Local\nvim\ && nvim init.vim
start cmd /k config
  1. Quit and Open powertoys if you are running already to pick up the new environment variable path.
  2. Now type the file name, in my case, coderag which will show up in the result list.

In action!

vishnuvardhan-s avatar Oct 16 '22 04:10 vishnuvardhan-s

PowerToys Run is already amazing, but this would improve it so much! Especially if you could have arguments within the shortcut, for instance setting the shortcut to something like python C:\Users\(my username)\Desktop\Code\Python\%1.py, then running it with runpy test, and it would run C:\Users\(my username)\Desktop\Code\Python\test.py.

ThePython10110 avatar Nov 06 '22 17:11 ThePython10110

+1 in this, I change from mac to windows and i really miss something like Alfred app in windows

nellsavedra avatar Nov 12 '22 11:11 nellsavedra

as an interim solution until Run is useable, I can recommend Keypirinha ( https://keypirinha.com/ ) Am 12.11.2022 um 12:27 schrieb Andrés Valle @.***>: +1 in this, I change from mac to windows and i really miss something like Alfred app in windows

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

mbaas2 avatar Nov 12 '22 12:11 mbaas2

as an interim solution until Run is useable, I can recommend Keypirinha ( https://keypirinha.com/ ) Am 12.11.2022 um 12:27 schrieb Andrés Valle @.>: +1 in this, I change from mac to windows and i really miss something like Alfred app in windows —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.>

Wow, thank you very much Michael, appreciate it!

nellsavedra avatar Nov 12 '22 12:11 nellsavedra

Please add support for short custom commands to programs/Urls/etc.

dkhmm avatar Nov 14 '22 13:11 dkhmm

as an interim solution until Run is useable, I can recommend Keypirinha ( https://keypirinha.com/ )

I switched to Keypirinha as well, since PowerToys Run is slower and Keypirinha has lots of configuration options.

ThePython10110 avatar Nov 14 '22 15:11 ThePython10110

I've fixed an issue in v0.61.0 so that a custom path can be setup to put shortcuts in. In order to use custom shortcuts, use to following steps:

  1. Close PowerToys.
  2. Open %LOCALAPPDATA%\Microsoft\PowerToys\PowerToys Run\Settings\Plugins\Microsoft.Plugin.Program\ProgramPluginSettings.json with a file editor.
  3. Add a program source to the content:
{
  "LastIndexTime": "2022-11-21T00:00:00+01:00",
  "ProgramSources": [
    {
      "Location": "C:\\Users\\{{username}}\\Documents\\Custom Shortcuts",
      "Name": "Custom Shortcuts",
      "Enabled": true,
      "UniqueIdentifier": "d379c7a9-bcfc-4edf-86b8-a256222558c2"
    }
  ],
  "DisabledProgramSources": [],
  "ProgramSuffixes": [
    "bat",
    "appref-ms",
    "exe",
    "lnk",
    "url"
  ],
  "EnableStartMenuSource": true,
  "EnableDesktopSource": true,
  "EnableRegistrySource": true,
  "EnablePathEnvironmentVariableSource": true,
  "MinScoreThreshold": 0.75
}
  1. Save and close the file.
  2. Start PowerToys.

Support for doing this using the UI is still missing.

yveslaurentcreton avatar Nov 21 '22 11:11 yveslaurentcreton

@BEzGumpTion Hm, I'm not sure how to use this. Am I correct in the assumption that "Custom Shortcuts" should then appear in the run dialog? Because it doesn't for me. I'm on version v0.64.1.

Personally, I'm mainly looking for the functionality to launch a program using a (keyboard) shortcut, but I don't think that's the concern of this thread.

Elias-Graf avatar Nov 21 '22 11:11 Elias-Graf

@Elias-Graf I've added that folder to the json, and I've added shortcuts to that folder (*.lnk). This lnk shows up in the list after restarting PowerToys.

yveslaurentcreton avatar Nov 21 '22 12:11 yveslaurentcreton

as an interim solution until Run is useable, I can recommend Keypirinha ( https://keypirinha.com/ )

I switched to Keypirinha as well, since PowerToys Run is slower and Keypirinha has lots of configuration options.

looks like Keypirinha doesn't have any active maintainers, though. last update was 2 years ago.

nakami avatar Dec 03 '22 13:12 nakami

3 long years I am waiting for this feature.... No, I am lying but I really want this.. any updates? 🤔

maracko avatar Dec 14 '23 17:12 maracko

I've fixed an issue in v0.61.0 so that a custom path can be setup to put shortcuts in. In order to use custom shortcuts, use to following steps:

1. Close PowerToys.

2. Open `%LOCALAPPDATA%\Microsoft\PowerToys\PowerToys Run\Settings\Plugins\Microsoft.Plugin.Program\ProgramPluginSettings.json` with a file editor.

3. Add a program source to the content:
{
  "LastIndexTime": "2022-11-21T00:00:00+01:00",
  "ProgramSources": [
    {
      "Location": "C:\\Users\\{{username}}\\Documents\\Custom Shortcuts",
      "Name": "Custom Shortcuts",
      "Enabled": true,
      "UniqueIdentifier": "d379c7a9-bcfc-4edf-86b8-a256222558c2"
    }
  ],
  "DisabledProgramSources": [],
  "ProgramSuffixes": [
    "bat",
    "appref-ms",
    "exe",
    "lnk",
    "url"
  ],
  "EnableStartMenuSource": true,
  "EnableDesktopSource": true,
  "EnableRegistrySource": true,
  "EnablePathEnvironmentVariableSource": true,
  "MinScoreThreshold": 0.75
}
4. Save and close the file.

5. Start PowerToys.

Support for doing this using the UI is still missing.

This is awesome! Do you think it could possible to add a keyword/trigger to search within that directory? That would be wonderful

mgastonportillo avatar Dec 19 '23 00:12 mgastonportillo

+1 this would be a really good feature. For those who live more on the web side of things this is a must

d43dm4n avatar Dec 28 '23 10:12 d43dm4n

I've fixed an issue in v0.61.0 so that a custom path can be setup to put shortcuts in. In order to use custom shortcuts, use to following steps:

This is really cool 🙌

However, this only seems to be working with shortcuts/links, not with exe files in the given folder. Is there any way to enable exe files as well for such custom program sources?

CombeeMike avatar Feb 14 '24 08:02 CombeeMike

However, this only seems to be working with shortcuts/links, not with exe files in the given folder. Is there any way to enable exe files as well for such custom program sources?

That would definitively be an improvement, I totally agree - https://github.com/microsoft/PowerToys/pull/30328 🙂

albertony avatar Feb 14 '24 08:02 albertony

Anyone found a solution to pass arguments?

I want to run from PowerToys something like chat What color is the sky?

Related: https://www.reddit.com/r/PowerToys/comments/1bzqy87/powertoys_integration_with_llmgpt_like_ollama/

Cristy94 avatar Apr 09 '24 13:04 Cristy94