diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml index 770bb69cc..1ea8ecb4b 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml @@ -1,8 +1,9 @@ - + - + Delete Edit Add @@ -16,6 +17,8 @@ When enabled, Flow will load programs from the start menu Index Registry When enabled, Flow will load programs from the registry + Hide Apps path + For executable files such as UWP or lnk, hide the file path from being visible Enable Program Description Disabling this will also stop Flow from searching via the program desciption Suffixes @@ -50,7 +53,7 @@ You can customized the explorer used for opening the container folder by inputing the Environmental Variable of the explorer you want to use. It will be useful to use CMD to test whether the Environmental Variable is avaliable. Enter the customized args you want to add for your customized explorer. %s for parent directory, %f for full path (which only works for win32). Check the explorer's website for details. - + Success Successfully disabled this program from displaying in your query This app is not intended to be run as administrator diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs index e96a8b85a..f280278e2 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs @@ -314,7 +314,7 @@ namespace Flow.Launcher.Plugin.Program.Programs var result = new Result { Title = title, - SubTitle = Package.Location, + SubTitle = HideLnkPath(), Icon = Logo, Score = matchResult.Score, TitleHighlightData = matchResult.MatchData, @@ -351,6 +351,18 @@ namespace Flow.Launcher.Plugin.Program.Programs return result; } + public string HideLnkPath() + { + bool lnkSetting = Main._settings.EnableHideLnkPath; + if (lnkSetting) + { + return ""; + } + else + { + return Package.Location; + } + } public List ContextMenus(IPublicAPI api) { diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index 213147660..809d0a605 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -97,7 +97,7 @@ namespace Flow.Launcher.Plugin.Program.Programs var result = new Result { Title = title, - SubTitle = LnkResolvedPath ?? FullPath, + SubTitle = HideLnkPath(), IcoPath = IcoPath, Score = matchResult.Score, TitleHighlightData = matchResult.MatchData, @@ -545,5 +545,17 @@ namespace Flow.Launcher.Plugin.Program.Programs return UniqueIdentifier == other.UniqueIdentifier; } + + public string HideLnkPath() + { + bool lnkSetting = Main._settings.EnableHideLnkPath; + if (lnkSetting) { + return ""; + } + else + { + return LnkResolvedPath ?? FullPath; + } + } } } \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs index 70e5bd4f5..031bbcd1f 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs @@ -13,7 +13,8 @@ namespace Flow.Launcher.Plugin.Program public bool EnableStartMenuSource { get; set; } = true; - public bool EnableDescription { get; set; } = true; + public bool EnableDescription { get; set; } = false; + public bool EnableHideLnkPath { get; set; } = true; public bool EnableRegistrySource { get; set; } = true; public string CustomizedExplorer { get; set; } = Explorer; public string CustomizedArgs { get; set; } = ExplorerArgs; diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml index d4cf96e86..f7b2602a1 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml @@ -12,7 +12,7 @@ mc:Ignorable="d"> - + @@ -33,6 +33,12 @@ Content="{DynamicResource flowlauncher_plugin_program_index_registry}" IsChecked="{Binding EnableRegistrySource}" ToolTip="{DynamicResource flowlauncher_plugin_program_index_registry_tooltip}" /> + _settings.EnableDescription; set => _settings.EnableDescription = value; } + public bool EnableHideLnkPath + { + get => _settings.EnableHideLnkPath; + set => _settings.EnableHideLnkPath = value; + } public bool EnableRegistrySource {