microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.12k stars 6.49k forks source link

[Run Programs] URL shortcuts are limited to certain protocols #33381

Open xieve opened 3 months ago

xieve commented 3 months ago

Microsoft PowerToys version

0.81.1

Installation method

Chocolatey

Running as admin

Yes

Area(s) with issue?

PowerToys Run

Steps to reproduce

Create URI shortcut for specific Obsidian vault:

image

Place this shortcut in:

C:\Users\<current user>\AppData\Roaming\Microsoft\Windows\Start Menu and/or C:\Users\<current user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs and/or C:\Users\<current user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Obsidian and/or C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu and/or C:\Users\<current user>\Desktop

Open PowerToys Run

image

No results. Sanity check:

image

These URL shortcuts work and are located in: C:\Users\<current user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Steam

They look like this:

image

If I don't restrict results to the programs plugin, I get results from Everything:

image

However the thumbnail/icon is not shown and the file extension is.

✔️ Expected Behavior

I want this shortcut to show up like any other program.

❌ Actual Behavior

Shortcut only shows up as file without icon.

Other Software

Obsidian v1.6.3

github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

xieve commented 3 months ago

Huh. The bot was better at searching than me. Duplicate of https://github.com/microsoft/PowerToys/issues/31322.

xieve commented 3 months ago

Reopening as a general-scope issue about being limited to two specific URI schemes. I don't see why PT Run should be hard-codedly limited to only steam and epic games URL shortcuts. This should at the very least be configurable.

cf. https://github.com/microsoft/PowerToys/blob/cdf5677eb9c6ab35d7355c241cfd0c079270c42b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/Win32Program.cs#L421-L501

Aaron-Junker commented 3 months ago

@htcfreek, do you know why it is limited only to these two protocols?

htcfreek commented 3 months ago

This eas not explicitly forced. It is by design. We need to decide if it is an application/webpage or not. So we only accept specific shortcuts which is currently apps, webpages and steam.

So we need an enhancement for the plugin code to support/allow these shortcuts.

xieve commented 3 months ago

This eas not explicitly forced. It is by design. We need to decide if it is an application/webpage or not. So we only accept specific shortcuts which is currently apps, webpages and steam.

So we need an enhancement for the plugin code to support/allow these shortcuts.

  1. Webpages are not allowed. I have a lot of .url shortcuts to webpages, none of which show up as programs. This is only logical, since https:// shortcuts are not among the two filtered types in the code snippet I linked above.
  2. What other types of .url shortcuts are there that would not be desirable to index? I can't think of any.

My rationale is as follows:

image

In my opinion, PT Run should never display less local results than the Start Menu in the default configuration.

Reading up on the history of the filter, URL shortcuts were added to support Steam and Epic Games games specifically. I believe this support should be broadened, and the filter removed or made configurable.