diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 43447793a0..5d7a402dd6 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -315,6 +315,7 @@ debugbreak declatory decryptor Dedup +Deeplink DEFAULTBOOTSTRAPPERINSTALLFOLDER DEFAULTCOLOR DEFAULTFLAGS diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdPalPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdPalPage.xaml index df8d9995ec..9e7420d84d 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdPalPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdPalPage.xaml @@ -27,12 +27,17 @@ Severity="Informational" /> - + + + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdPalPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdPalPage.xaml.cs index f00acdc750..a4c53d075c 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdPalPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdPalPage.xaml.cs @@ -2,6 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; +using System.Diagnostics; +using System.IO; +using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Helpers; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.ViewModels; @@ -29,5 +33,37 @@ namespace Microsoft.PowerToys.Settings.UI.Views { ViewModel.RefreshEnabledState(); } + + private void LaunchApp(string appPath) + { + try + { + string dir = Path.GetDirectoryName(appPath); + + var processStartInfo = new ProcessStartInfo + { + FileName = appPath, + Arguments = string.Empty, + WorkingDirectory = dir, + UseShellExecute = true, + Verb = "open", + CreateNoWindow = false, + }; + + Process process = Process.Start(processStartInfo) ?? throw new InvalidOperationException("Failed to start the process."); + process.WaitForInputIdle(); + } + catch (Exception ex) + { + throw new InvalidOperationException($"Failed to launch CmdPal settings: {ex.Message}"); + } + } + + private void CmdPalSettingsDeeplink_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) + { + // Launch CmdPal settings window + string launchPath = "x-cmdpal://settings"; + LaunchApp(launchPath); + } } } diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw index 694603707c..c3f7dd7788 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -4996,8 +4996,8 @@ To record a specific window, enter the hotkey with the Alt key in the opposite m Activation shortcut - - Go to Command Palette settings to customize the activation shortcut. + + Open Command Palette settings to customize the activation shortcut chroma (CIE LCh)