mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
CmdPal: Add settings to hide non-apps from results (#45741)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR adds new options to the All Apps built-in extension: - Also include non-app shortcuts from the Start menu - Enabled by default - Also include non-app shortcuts from the desktop - Disabled by default The default states reflect that Start menu shortcuts are largely curated by installers, and the Start menu itself typically does not surface non-app items. Desktop shortcuts, on the other hand, are more likely to be created by the user. <img width="812" height="499" alt="image" src="https://github.com/user-attachments/assets/de6c4723-0b52-4606-98fa-469364f5648e" />
This commit is contained in:
@@ -13,6 +13,8 @@ public class Settings : ISettingsInterface
|
||||
private readonly bool enableDesktopSource;
|
||||
private readonly bool enableRegistrySource;
|
||||
private readonly bool enablePathEnvironmentVariableSource;
|
||||
private readonly bool includeNonAppsOnDesktop;
|
||||
private readonly bool includeNonAppsInStartMenu;
|
||||
private readonly List<string> programSuffixes;
|
||||
private readonly List<string> runCommandSuffixes;
|
||||
|
||||
@@ -21,6 +23,8 @@ public class Settings : ISettingsInterface
|
||||
bool enableDesktopSource = true,
|
||||
bool enableRegistrySource = true,
|
||||
bool enablePathEnvironmentVariableSource = true,
|
||||
bool includeNonAppsOnDesktop = false,
|
||||
bool includeNonAppsInStartMenu = true,
|
||||
List<string> programSuffixes = null,
|
||||
List<string> runCommandSuffixes = null)
|
||||
{
|
||||
@@ -28,6 +32,8 @@ public class Settings : ISettingsInterface
|
||||
this.enableDesktopSource = enableDesktopSource;
|
||||
this.enableRegistrySource = enableRegistrySource;
|
||||
this.enablePathEnvironmentVariableSource = enablePathEnvironmentVariableSource;
|
||||
this.includeNonAppsOnDesktop = includeNonAppsOnDesktop;
|
||||
this.includeNonAppsInStartMenu = includeNonAppsInStartMenu;
|
||||
this.programSuffixes = programSuffixes ?? new List<string> { "bat", "appref-ms", "exe", "lnk", "url" };
|
||||
this.runCommandSuffixes = runCommandSuffixes ?? new List<string> { "bat", "appref-ms", "exe", "lnk", "url", "cpl", "msc" };
|
||||
}
|
||||
@@ -40,6 +46,10 @@ public class Settings : ISettingsInterface
|
||||
|
||||
public bool EnablePathEnvironmentVariableSource => enablePathEnvironmentVariableSource;
|
||||
|
||||
public bool IncludeNonAppsOnDesktop => includeNonAppsOnDesktop;
|
||||
|
||||
public bool IncludeNonAppsInStartMenu => includeNonAppsInStartMenu;
|
||||
|
||||
public List<string> ProgramSuffixes => programSuffixes;
|
||||
|
||||
public List<string> RunCommandSuffixes => runCommandSuffixes;
|
||||
|
||||
Reference in New Issue
Block a user