diff --git a/Flow.Launcher.Infrastructure/UserSettings/CustomBrowserViewModel.cs b/Flow.Launcher.Infrastructure/UserSettings/CustomBrowserViewModel.cs
new file mode 100644
index 000000000..24584115d
--- /dev/null
+++ b/Flow.Launcher.Infrastructure/UserSettings/CustomBrowserViewModel.cs
@@ -0,0 +1,33 @@
+using Flow.Launcher.Plugin;
+using System.Text.Json.Serialization;
+
+namespace Flow.Launcher.Infrastructure.UserSettings
+{
+ public class CustomBrowserViewModel : BaseModel
+ {
+ public string Name { get; set; }
+ public string Path { get; set; }
+ public string PrivateArg { get; set; }
+ public bool EnablePrivate { get; set; }
+ public bool OpenInTab { get; set; } = true;
+ [JsonIgnore]
+ public bool OpenInNewWindow => !OpenInTab;
+ public bool Editable { get; set; } = true;
+
+ public CustomBrowserViewModel Copy()
+ {
+ return new CustomBrowserViewModel
+ {
+ Name = Name,
+ Path = Path,
+ OpenInTab = OpenInTab,
+ PrivateArg = PrivateArg,
+ EnablePrivate = EnablePrivate,
+ Editable = Editable
+ };
+ }
+ }
+}
+
+
+
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 6bf9c2ff0..8ecd6dc4b 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -39,6 +39,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public string ResultFontWeight { get; set; }
public string ResultFontStretch { get; set; }
public bool UseGlyphIcons { get; set; } = true;
+ public bool UseAnimation { get; set; } = true;
+ public bool UseSound { get; set; } = true;
public bool FirstLaunch { get; set; } = true;
public int CustomExplorerIndex { get; set; } = 0;
@@ -84,8 +86,52 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
};
- public bool UseAnimation { get; set; } = true;
- public bool UseSound { get; set; } = true;
+ public int CustomBrowserIndex { get; set; } = 0;
+
+ [JsonIgnore]
+ public CustomBrowserViewModel CustomBrowser
+ {
+ get => CustomBrowserList[CustomBrowserIndex];
+ set => CustomBrowserList[CustomBrowserIndex] = value;
+ }
+
+ public List CustomBrowserList { get; set; } = new()
+ {
+ new()
+ {
+ Name = "Default",
+ Path = "*",
+ PrivateArg = "",
+ EnablePrivate = false,
+ Editable = false
+ },
+ new()
+ {
+ Name = "Google Chrome",
+ Path = "chrome",
+ PrivateArg = "-incognito",
+ EnablePrivate = false,
+ Editable = false
+ },
+ new()
+ {
+ Name = "Mozilla Firefox",
+ Path = "firefox",
+ PrivateArg = "-private",
+ EnablePrivate = false,
+ Editable = false
+ }
+ ,
+ new()
+ {
+ Name = "MS Edge",
+ Path = "msedge",
+ PrivateArg = "-inPrivate",
+ EnablePrivate = false,
+ Editable = false
+ }
+ };
+
///
/// when false Alphabet static service will always return empty results
diff --git a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
index c808052b0..7ce2fc8fd 100644
--- a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
+++ b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
@@ -14,10 +14,10 @@
- 2.0.0
- 2.0.0
- 2.0.0
- 2.0.0
+ 2.1.0
+ 2.1.0
+ 2.1.0
+ 2.1.0Flow.Launcher.PluginFlow-LauncherMIT
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index d1444d5db..133ad25a5 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -226,5 +226,10 @@ namespace Flow.Launcher.Plugin
/// Directory Path to open
/// Extra FileName Info
public void OpenDirectory(string DirectoryPath, string FileName = null);
+
+ ///
+ /// Opens the url. The browser and mode used is based on what's configured in Flow's default browser settings.
+ ///
+ public void OpenUrl(string url, bool? inPrivate = null);
}
}
diff --git a/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs b/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs
index 95d057707..6c4ac8ebf 100644
--- a/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs
+++ b/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs
@@ -35,18 +35,21 @@ namespace Flow.Launcher.Plugin.SharedCommands
/// Opens search in a new browser. If no browser path is passed in then Chrome is used.
/// Leave browser path blank to use Chrome.
///
- public static void NewBrowserWindow(this string url, string browserPath = "")
+ public static void OpenInBrowserWindow(this string url, string browserPath = "", bool inPrivate = false, string privateArg = "")
{
browserPath = string.IsNullOrEmpty(browserPath) ? GetDefaultBrowserPath() : browserPath;
var browserExecutableName = browserPath?
- .Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.None)
- .Last();
+ .Split(new[]
+ {
+ Path.DirectorySeparatorChar
+ }, StringSplitOptions.None)
+ .Last();
var browser = string.IsNullOrEmpty(browserExecutableName) ? "chrome" : browserPath;
// Internet Explorer will open url in new browser window, and does not take the --new-window parameter
- var browserArguements = browserExecutableName == "iexplore.exe" ? url : "--new-window " + url;
+ var browserArguements = (browserExecutableName == "iexplore.exe" ? "" : "--new-window ") + (inPrivate ? $"{privateArg} " : "") + url;
var psi = new ProcessStartInfo
{
@@ -61,24 +64,36 @@ namespace Flow.Launcher.Plugin.SharedCommands
}
catch (System.ComponentModel.Win32Exception)
{
- Process.Start(new ProcessStartInfo { FileName = url, UseShellExecute = true });
+ Process.Start(new ProcessStartInfo
+ {
+ FileName = url, UseShellExecute = true
+ });
}
}
+ [Obsolete("This is provided for backwards compatibility after 1.9.0 release, e.g. GitHub plugin. Use the new method instead")]
+ public static void NewBrowserWindow(this string url, string browserPath = "")
+ {
+ OpenInBrowserWindow(url, browserPath);
+ }
+
///
/// Opens search as a tab in the default browser chosen in Windows settings.
///
- public static void NewTabInBrowser(this string url, string browserPath = "")
+ public static void OpenInBrowserTab(this string url, string browserPath = "", bool inPrivate = false, string privateArg = "")
{
browserPath = string.IsNullOrEmpty(browserPath) ? GetDefaultBrowserPath() : browserPath;
- var psi = new ProcessStartInfo() { UseShellExecute = true };
+ var psi = new ProcessStartInfo()
+ {
+ UseShellExecute = true
+ };
try
{
if (!string.IsNullOrEmpty(browserPath))
{
psi.FileName = browserPath;
- psi.Arguments = url;
+ psi.Arguments = (inPrivate ? $"{privateArg} " : "") + url;
}
else
{
@@ -90,8 +105,17 @@ namespace Flow.Launcher.Plugin.SharedCommands
// This error may be thrown if browser path is incorrect
catch (System.ComponentModel.Win32Exception)
{
- Process.Start(new ProcessStartInfo { FileName = url, UseShellExecute = true });
+ Process.Start(new ProcessStartInfo
+ {
+ FileName = url, UseShellExecute = true
+ });
}
}
+
+ [Obsolete("This is provided for backwards compatibility after 1.9.0 release, e.g. GitHub plugin. Use the new method instead")]
+ public static void NewTabInBrowser(this string url, string browserPath = "")
+ {
+ OpenInBrowserTab(url, browserPath);
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 0c6bb05c6..e11cbd5cb 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -38,6 +38,8 @@
Disable Flow Launcher activation when a full screen application is active (Recommended for games).Default File ManagerSelect the file manager to use when opening the folder.
+ Default Web Browser
+ Setting for New Tab, New Window, Private Mode.Python DirectoryAuto UpdateSelect
@@ -164,6 +166,16 @@
Arg For FolderArg For File
+
+ Default Web Browser
+ The default setting follows the OS default browser setting. If specified separately, flow uses that browser.
+ Browser
+ Browser Name
+ Browser Path
+ New Window
+ New Tab
+ Priviate Mode
+
Change PriorityGreater the number, the higher the result will be ranked. Try setting it as 5. If you want the results to be lower than any other plugin's, provide a negative number
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 6713929d6..5b490bede 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -114,7 +114,7 @@ namespace Flow.Launcher
var startInfo = ShellCommand.SetProcessStartInfo(filename, arguments: args, createNoWindow: true);
ShellCommand.Execute(startInfo);
}
-
+
public void CopyToClipboard(string text)
{
Clipboard.SetDataObject(text);
@@ -196,7 +196,7 @@ namespace Flow.Launcher
public void OpenDirectory(string DirectoryPath, string FileName = null)
{
- using Process explorer = new Process();
+ using var explorer = new Process();
var explorerInfo = _settingsVM.Settings.CustomExplorer;
explorer.StartInfo = new ProcessStartInfo
{
@@ -209,6 +209,23 @@ namespace Flow.Launcher
explorer.Start();
}
+ public void OpenUrl(string url, bool? inPrivate = null)
+ {
+ var browserInfo = _settingsVM.Settings.CustomBrowser;
+
+ var path = browserInfo.Path == "*" ? "" : browserInfo.Path;
+
+ if (browserInfo.OpenInTab)
+ {
+ url.OpenInBrowserTab(path, inPrivate ?? browserInfo.EnablePrivate, browserInfo.PrivateArg);
+ }
+ else
+ {
+ url.OpenInBrowserWindow(path, inPrivate ?? browserInfo.EnablePrivate, browserInfo.PrivateArg);
+ }
+
+ }
+
public event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent;
private readonly List> _globalKeyboardHandlers = new();
diff --git a/Flow.Launcher/SelectBrowserWindow.xaml b/Flow.Launcher/SelectBrowserWindow.xaml
new file mode 100644
index 000000000..3f0793c53
--- /dev/null
+++ b/Flow.Launcher/SelectBrowserWindow.xaml
@@ -0,0 +1,264 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New Tab
+ New Window
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Flow.Launcher/SelectBrowserWindow.xaml.cs b/Flow.Launcher/SelectBrowserWindow.xaml.cs
new file mode 100644
index 000000000..37f0c47ae
--- /dev/null
+++ b/Flow.Launcher/SelectBrowserWindow.xaml.cs
@@ -0,0 +1,88 @@
+using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Flow.Launcher
+{
+ public partial class SelectBrowserWindow : Window, INotifyPropertyChanged
+ {
+ private int selectedCustomBrowserIndex;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public Settings Settings { get; }
+
+ public int SelectedCustomBrowserIndex
+ {
+ get => selectedCustomBrowserIndex; set
+ {
+ selectedCustomBrowserIndex = value;
+ PropertyChanged?.Invoke(this, new(nameof(CustomBrowser)));
+ }
+ }
+ public ObservableCollection CustomBrowsers { get; set; }
+
+ public CustomBrowserViewModel CustomBrowser => CustomBrowsers[SelectedCustomBrowserIndex];
+ public SelectBrowserWindow(Settings settings)
+ {
+ Settings = settings;
+ CustomBrowsers = new ObservableCollection(Settings.CustomBrowserList.Select(x => x.Copy()));
+ SelectedCustomBrowserIndex = Settings.CustomBrowserIndex;
+ InitializeComponent();
+ }
+
+ private void btnCancel_Click(object sender, RoutedEventArgs e)
+ {
+ Close();
+ }
+
+ private void btnDone_Click(object sender, RoutedEventArgs e)
+ {
+ Settings.CustomBrowserList = CustomBrowsers.ToList();
+ Settings.CustomBrowserIndex = SelectedCustomBrowserIndex;
+ Close();
+ }
+
+ private void btnAdd_Click(object sender, RoutedEventArgs e)
+ {
+ CustomBrowsers.Add(new()
+ {
+ Name = "New Profile"
+ });
+ SelectedCustomBrowserIndex = CustomBrowsers.Count - 1;
+ }
+
+ private void btnDelete_Click(object sender, RoutedEventArgs e)
+ {
+ CustomBrowsers.RemoveAt(SelectedCustomBrowserIndex--);
+ }
+
+ private void btnBrowseFile_Click(object sender, RoutedEventArgs e)
+ {
+ Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
+ Nullable result = dlg.ShowDialog();
+
+ if (result == true)
+ {
+ TextBox path = (TextBox)(((FrameworkElement)sender).Parent as FrameworkElement).FindName("PathTextBox");
+ path.Text = dlg.FileName;
+ path.Focus();
+ ((Button)sender).Focus();
+ }
+ }
+ }
+}
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index 0e6945531..d8c94390b 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -818,6 +818,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index 3f2d7ebd3..f17c18441 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -120,6 +120,12 @@ namespace Flow.Launcher
fileManagerChangeWindow.ShowDialog();
}
+ private void OnSelectDefaultBrowserClick(object sender, RoutedEventArgs e)
+ {
+ var browserWindow = new SelectBrowserWindow(settings);
+ browserWindow.ShowDialog();
+ }
+
#endregion
#region Hotkey
@@ -260,7 +266,7 @@ namespace Flow.Launcher
private void OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
- e.Uri.AbsoluteUri.NewTabInBrowser();
+ API.OpenUrl(e.Uri.AbsoluteUri);
e.Handled = true;
}
@@ -365,4 +371,4 @@ namespace Flow.Launcher
}
}
-}
\ No newline at end of file
+}
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 37052cca6..abf3a1d14 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -191,7 +191,7 @@ namespace Flow.Launcher.ViewModel
StartHelpCommand = new RelayCommand(_ =>
{
- SearchWeb.NewTabInBrowser("https://github.com/Flow-Launcher/Flow.Launcher/wiki/Flow-Launcher/");
+ PluginManager.API.OpenUrl("https://github.com/Flow-Launcher/Flow.Launcher/wiki/Flow-Launcher/");
});
OpenSettingCommand = new RelayCommand(_ => { App.API.OpenSettingDialog(); });
OpenResultCommand = new RelayCommand(index =>
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml
index ab854b8ed..af2a556c1 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml
@@ -1,12 +1,14 @@
-
+
-
- Browser Bookmarks
- Search your browser bookmarks
+
+ Browser Bookmarks
+ Search your browser bookmarks
-
+
+ Bookmmark DataOpen bookmarks in:New windowNew tab
@@ -16,7 +18,7 @@
Copy the bookmark's url to clipboardLoad Browser From:Browser Name
- DataDirectoryPath
+ Data Directory PathAddDelete
\ No newline at end of file
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
index f8610a9ec..1d58f84d8 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
@@ -48,14 +48,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
Score = BookmarkLoader.MatchProgram(c, param).Score,
Action = _ =>
{
- if (_settings.OpenInNewBrowserWindow)
- {
- c.Url.NewBrowserWindow(_settings.BrowserPath);
- }
- else
- {
- c.Url.NewTabInBrowser(_settings.BrowserPath);
- }
+ context.API.OpenUrl(c.Url);
return true;
},
@@ -73,15 +66,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
Score = 5,
Action = _ =>
{
- if (_settings.OpenInNewBrowserWindow)
- {
- c.Url.NewBrowserWindow(_settings.BrowserPath);
- }
- else
- {
- c.Url.NewTabInBrowser(_settings.BrowserPath);
- }
-
+ context.API.OpenUrl(c.Url);
return true;
},
ContextData = new BookmarkAttributes { Url = c.Url }
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml
index ff3fbb38e..8a2a65f26 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml
@@ -1,38 +1,130 @@
-
+
+
+
+
-
+
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml
index 1ee02fa43..6762ca345 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml
@@ -10,71 +10,12 @@
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs
index 56fa58acf..5f5d3246c 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs
@@ -1,19 +1,16 @@
-using Microsoft.Win32;
using System.Windows;
-using System.Windows.Controls;
using Flow.Launcher.Plugin.BrowserBookmark.Models;
using System.Windows.Input;
using System.ComponentModel;
namespace Flow.Launcher.Plugin.BrowserBookmark.Views
{
- ///
- /// Interaction logic for BrowserBookmark.xaml
- ///
public partial class SettingsControl : INotifyPropertyChanged
{
public Settings Settings { get; }
+
public CustomBrowser SelectedCustomBrowser { get; set; }
+
public bool OpenInNewBrowserWindow
{
get => Settings.OpenInNewBrowserWindow;
@@ -23,10 +20,6 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(OpenInNewBrowserWindow)));
}
}
- public bool OpenInNewTab
- {
- get => !OpenInNewBrowserWindow;
- }
public SettingsControl(Settings settings)
{
@@ -36,18 +29,6 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
public event PropertyChangedEventHandler PropertyChanged;
- private void OnChooseClick(object sender, RoutedEventArgs e)
- {
- var fileBrowserDialog = new OpenFileDialog();
- fileBrowserDialog.Filter = "Application(*.exe)|*.exe|All files|*.*";
- fileBrowserDialog.CheckFileExists = true;
- fileBrowserDialog.CheckPathExists = true;
- if (fileBrowserDialog.ShowDialog() == true)
- {
- Settings.BrowserPath = fileBrowserDialog.FileName;
- }
- }
-
private void NewCustomBrowser(object sender, RoutedEventArgs e)
{
var newBrowser = new CustomBrowser();
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json
index d72db3a90..e5195b3a0 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json
@@ -4,7 +4,7 @@
"Name": "Browser Bookmarks",
"Description": "Search your browser bookmarks",
"Author": "qianlifeng, Ioannis G.",
- "Version": "1.5.3",
+ "Version": "1.6.0",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.BrowserBookmark.dll",
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs
index 035ae629a..a20e5a267 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs
@@ -29,7 +29,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
IcoPath = selectedResult.IcoPath,
Action = _ =>
{
- SharedCommands.SearchWeb.NewTabInBrowser(pluginManifestInfo.Website);
+ Context.API.OpenUrl(pluginManifestInfo.Website);
return true;
}
},
@@ -40,7 +40,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
IcoPath = "Images\\sourcecode.png",
Action = _ =>
{
- SharedCommands.SearchWeb.NewTabInBrowser(pluginManifestInfo.UrlSourceCode);
+ Context.API.OpenUrl(pluginManifestInfo.UrlSourceCode);
return true;
}
},
@@ -56,7 +56,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
? pluginManifestInfo.UrlSourceCode.Replace("/tree/master", "/issues/new/choose")
: pluginManifestInfo.UrlSourceCode;
- SharedCommands.SearchWeb.NewTabInBrowser(link);
+ Context.API.OpenUrl(link);
return true;
}
},
@@ -67,7 +67,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
IcoPath = "Images\\manifestsite.png",
Action = _ =>
{
- SharedCommands.SearchWeb.NewTabInBrowser("https://github.com/Flow-Launcher/Flow.Launcher.PluginsManifest");
+ Context.API.OpenUrl("https://github.com/Flow-Launcher/Flow.Launcher.PluginsManifest");
return true;
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json b/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json
index bf1ae5d8e..c46ea91d9 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json
@@ -6,7 +6,7 @@
"Name": "Plugins Manager",
"Description": "Management of installing, uninstalling or updating Flow Launcher plugins",
"Author": "Jeremy Wu",
- "Version": "1.10.0",
+ "Version": "1.11.0",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll",
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
index 6208fc000..7b5d85ae9 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
@@ -315,7 +315,7 @@ namespace Flow.Launcher.Plugin.Sys
IcoPath = "Images\\app.png",
Action = c =>
{
- SearchWeb.NewTabInBrowser(Constant.Documentation);
+ context.API.OpenUrl(Constant.Documentation);
return true;
}
},
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json
index 1a8f008c3..4c381eec2 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json
+++ b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json
@@ -4,7 +4,7 @@
"Name": "System Commands",
"Description": "Provide System related commands. e.g. shutdown,lock, setting etc.",
"Author": "qianlifeng",
- "Version": "1.5.1",
+ "Version": "1.6.0",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll",
diff --git a/Plugins/Flow.Launcher.Plugin.Url/Main.cs b/Plugins/Flow.Launcher.Plugin.Url/Main.cs
index 0f4b6c117..9d5b528ec 100644
--- a/Plugins/Flow.Launcher.Plugin.Url/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Url/Main.cs
@@ -68,14 +68,7 @@ namespace Flow.Launcher.Plugin.Url
}
try
{
- if (_settings.OpenInNewBrowserWindow)
- {
- raw.NewBrowserWindow(_settings.BrowserPath);
- }
- else
- {
- raw.NewTabInBrowser(_settings.BrowserPath);
- }
+ context.API.OpenUrl(raw);
return true;
}
diff --git a/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml
index 8c27fd667..8ff7b5ab5 100644
--- a/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml
@@ -1,29 +1,17 @@
-
+
-
-
-
-
-
-
-
-
-
-
diff --git a/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs b/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs
index 6c899dbfe..dce13c522 100644
--- a/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs
@@ -1,25 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using Microsoft.Win32;
-
namespace Flow.Launcher.Plugin.Url
{
- ///
- /// SettingsControl.xaml 的交互逻辑
- ///
public partial class SettingsControl : UserControl
{
private Settings _settings;
@@ -30,37 +15,7 @@ namespace Flow.Launcher.Plugin.Url
InitializeComponent();
_settings = settings;
_flowlauncherAPI = flowlauncherAPI;
- browserPathBox.Text = _settings.BrowserPath;
- NewWindowBrowser.IsChecked = _settings.OpenInNewBrowserWindow;
- NewTabInBrowser.IsChecked = !_settings.OpenInNewBrowserWindow;
- }
- private void OnChooseClick(object sender, RoutedEventArgs e)
- {
- var fileBrowserDialog = new OpenFileDialog();
- fileBrowserDialog.Filter = _flowlauncherAPI.GetTranslation("flowlauncher_plugin_url_plugin_filter"); ;
- fileBrowserDialog.CheckFileExists = true;
- fileBrowserDialog.CheckPathExists = true;
- if (fileBrowserDialog.ShowDialog() == true)
- {
- browserPathBox.Text = fileBrowserDialog.FileName;
- _settings.BrowserPath = fileBrowserDialog.FileName;
- }
- }
-
- private void OnNewBrowserWindowClick(object sender, RoutedEventArgs e)
- {
- _settings.OpenInNewBrowserWindow = true;
- }
-
- private void OnNewTabClick(object sender, RoutedEventArgs e)
- {
- _settings.OpenInNewBrowserWindow = false;
- }
-
- private void OnBrowserPathTextChanged(object sender, TextChangedEventArgs e)
- {
- _settings.BrowserPath = browserPathBox.Text;
}
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.Url/plugin.json b/Plugins/Flow.Launcher.Plugin.Url/plugin.json
index e1481f842..df2771dec 100644
--- a/Plugins/Flow.Launcher.Plugin.Url/plugin.json
+++ b/Plugins/Flow.Launcher.Plugin.Url/plugin.json
@@ -4,7 +4,7 @@
"Name": "URL",
"Description": "Open the typed URL from Flow Launcher",
"Author": "qianlifeng",
- "Version": "1.1.7",
+ "Version": "1.2.0",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.Url.dll",
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs
index 8d8c84392..31d56c108 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs
@@ -74,14 +74,7 @@ namespace Flow.Launcher.Plugin.WebSearch
Score = score,
Action = c =>
{
- if (_settings.OpenInNewBrowser)
- {
- searchSource.Url.Replace("{q}", Uri.EscapeDataString(keyword)).NewBrowserWindow(_settings.BrowserPath);
- }
- else
- {
- searchSource.Url.Replace("{q}", Uri.EscapeDataString(keyword)).NewTabInBrowser(_settings.BrowserPath);
- }
+ _context.API.OpenUrl(searchSource.Url.Replace("{q}", Uri.EscapeDataString(keyword)));
return true;
}
@@ -143,14 +136,7 @@ namespace Flow.Launcher.Plugin.WebSearch
ActionKeywordAssigned = searchSource.ActionKeyword == SearchSourceGlobalPluginWildCardSign ? string.Empty : searchSource.ActionKeyword,
Action = c =>
{
- if (_settings.OpenInNewBrowser)
- {
- searchSource.Url.Replace("{q}", Uri.EscapeDataString(o)).NewBrowserWindow(_settings.BrowserPath);
- }
- else
- {
- searchSource.Url.Replace("{q}", Uri.EscapeDataString(o)).NewTabInBrowser(_settings.BrowserPath);
- }
+ _context.API.OpenUrl(searchSource.Url.Replace("{q}", Uri.EscapeDataString(o)));
return true;
}
@@ -170,7 +156,7 @@ namespace Flow.Launcher.Plugin.WebSearch
_settings = _context.API.LoadSettingJsonStorage();
_viewModel = new SettingsViewModel(_settings);
-
+
var pluginDirectory = _context.CurrentPluginMetadata.PluginDirectory;
var bundledImagesDirectory = Path.Combine(pluginDirectory, Images);
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml
index 2d4da962b..07c7a05ba 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml
@@ -37,59 +37,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
-
-[](https://ci.appveyor.com/project/JohnTheGr8/flow-launcher/branch/dev)
-[](https://github.com/Flow-Launcher/Flow.Launcher/releases)
-
-[](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest)
-[](https://flow-launcher.github.io/docs)
-[](https://discord.gg/AvgAQgh)
+
+
+
+
+
+
+
+
+
+
-Flow Launcher. Dedicated to make your workflow flow more seamlessly. Aimed at being more than an app launcher, it searches, integrates and expands on functionalities. Flow will continue to evolve, designed to be open and built with the community at heart.
+
+Dedicated to making your workflow flow more seamless. Search everything from applications, files, bookmarks, YouTube, Twitter and more. Flow will continue to evolve, designed to be open and built with the community at heart.
-Remember to star it, flow will love you more :)
+
+
+
+
+
+## 🎉 New Features in 1.9
+
+
+
+- All New Design. New Themes, New Setting Window. Animation & Sound Effect, Color Scheme aka Dark Mode.
+- New Plugins, Plugin Store, Game Mode, Wizard window
+- Full changelog
+
+
----
+
-## Features
-
-
-
-- Search everything from applications, files, bookmarks, YouTube, Twitter and more. All from the comfort of your keyboard without ever touching the mouse.
-- Search for file contents.
-- Do mathematical calculations and copy the result to clipboard.
-- Support search using environment variable paths.
-- Run batch and PowerShell commands as Administrator or a different user.
-- Support languages from Chinese to Italian and more.
-- Support wide range of plugins.
-- Prioritise the order of each plugin's results.
-- Save file or folder locations for quick access.
-- Fully portable.
-
-[ **SOFTPEDIA EDITOR'S PICK**](https://www.softpedia.com/get/System/Launchers-Shutdown-Tools/Flow-Launcher.shtml)
-
-## Getting Started
+## 🚗 Getting Started
### Installation
| [Windows 7+ installer](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest/download/Flow-Launcher-Setup.exe) | [Portable](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest/download/Flow-Launcher-Portable.zip) | `WinGet install "Flow Launcher"` |
-| --------------------------------- | --------------------------------- | --------------------------------- |
+| :----------------------------------------------------------: | :----------------------------------------------------------: | :------------------------------: |
-Windows may complain about security due to code not being signed, this will be completed at a later stage. If you downloaded from this repo, you are good to continue the set up.
+> Windows may complain about security due to code not being signed, this will be completed at a later stage. If you downloaded from this repo, you are good to continue the set up.
-### Usage
-- Open flow's search window: Alt+Space is the default hotkey.
-- Open context menu: on the selected result, press Ctrl+O/Shift+Enter.
-- Cancel/Return to previous screen: Esc.
-- Install/Uninstall/Update plugins: in the search window, type `pm` `install`/`uninstall`/`update` + the plugin name.
+And you can download early access version.
+
+
+
+## 🎁 Features
+
+### Applications & Files
+
+
+
+
+- Search for files or their contents.
+
+
+
+
+- Support search using environment variable paths.
+
+### Web Search & Open URL
+
+
+
+
+
+### Browser Bookmarks
+
+
+
+### System Commands
+
+
+
+- Provides System related commands. shutdown, lock, settings, etc.
+- System command list
+
+### Calculator
+
+
+
+- Do mathematical calculations and copy the result to clipboard.
+
+### Shell Command
+
+
+
+- Run batch and PowerShell commands as Administrator or a different user.
+- Ctrl+Enter to Run as Administrator.
+
+### Explorer
+
+
+
+- Save file or folder locations for quick access.
+
+### Window Setting & Control Panel
+
+
+
+- Search within Window Settings & Control Panel.
+
+
+### Priority
+
+
+
+
+- Prioritise the order of each plugin's results.
+
+### Customization
+
+
+
+- Window size adjustment, animation, and sound
+- Color Scheme (aka Dark Mode)
+
+
+
+- There are various themes and you can make it yourself.
+
+### 💬 Language
+
+- Support languages from Chinese to Italian and more.
+- Support Pinyin.
+- Translation support this project in [Crowdin](https://crowdin.com/project/flow-launcher)
+
+### Portable
+
+- Fully portable.
- Type `flow user data` to open your saved user settings folder. They are located at:
- If using roaming: `%APPDATA%\FlowLauncher`
- If using portable, by default: `%localappdata%\FlowLauncher\app-\UserData`
-- Type `open log location` to open your logs folder, they are saved along with your user settings folder.
+ - Type `open log location` to open your logs folder, they are saved along with your user settings folder.
-[More tips](https://flow-launcher.github.io/docs/#/usage-tips)
+### 🎮 Game Mode
-### Plugins
+
-Flow searches files and contents via Windows Index Search, to use **Everything**: `pm install everything`.
+- Suspend the hotkey when you are playing games.
-If you are using Python plugins, flow will prompt to either select the location or allow Python (Embeddable) to be automatic downloaded for use.
+
-Vist [here](https://flow-launcher.github.io/docs/#/plugins) for our plugin portfolio.
+## 📦 Plugins
-If you are keen to write your own plugin for flow, please take a look at our plugin development documentation for [C#](https://flow-launcher.github.io/docs/#/develop-dotnet-plugins) or [Python](https://flow-launcher.github.io/docs/#/develop-py-plugins)
+- Support wide range of plugins. Visit [here](https://flow-launcher.github.io/docs/#/plugins) for our plugin portfolio.
+- If you are using Python plugins, flow will prompt to either select the location or allow Python (Embeddable) to be automatic downloaded for use.
+- Create and publish your own plugin to flow! Take a look at our plugin development documentation for [C#](https://flow-launcher.github.io/docs/#/develop-dotnet-plugins) or [Python](https://flow-launcher.github.io/docs/#/develop-py-plugins)
-## Questions/Suggestions
+### Everything
+
-Yes please, let us know in the [Q&A](https://github.com/Flow-Launcher/Flow.Launcher/discussions/categories/q-a) section.
+### SpotifyPremium
+
-**Join our community on [Discord](https://discord.gg/AvgAQgh)!**
+
+### Steam Search
+
+
+
+### Clipboard History
+
+
+### Home Assistant Commander
+
+
+### Colors
+
+
+
+### Github
+
+
+### Windows Walker
+
+
+......and more!
+
+
+
+### 🛒 Plugin Store
+
+
+
+- You can view the full plugin list or quickly install a plugin via the Plugin Store menu in Settings
+
+- or type `pm` `install`/`uninstall`/`update` + the plugin name in the search window,
+
+
+
+
+## ⌨️ Hotkeys
+
+| Hotkey | Description |
+| ------------------------------------------------------------ | -------------------------------------------- |
+| Alt+ Space | Open Search Box (Default and Configurable) |
+| Enter | Execute |
+| Ctrl+Shift+Enter | Run As Admin |
+| ↑↓ | Scroll up & Down |
+| ←→ | Back to Result / Open Context Menu |
+| Ctrl +o , Shift +Enter | Open Context Menu |
+| Tab | Autocomplete |
+| Esc | Back to Result & Close |
+| Ctrl +i | Open Setting Window |
+| F5 | Reload All Plugin Data & Window Search Index |
+| Ctrl + h | Open Query History |
+
+
+## System Command List
+
+| Command | Description |
+| ---------------------- | ------------------------------------------------------------ |
+| Shutdown | Shutdown computer |
+| Restart | Restart computer |
+| Restart with advance | Restart the computer with Advanced Boot option for safe and debugging modes |
+| Log off | Log off |
+| Lock | Lock computer |
+| Sleep | Put computer to sleep |
+| Hibernate | Hibernate computer |
+| Empty Recycle Bin | Empty recycle bin |
+| Exit | Close Flow Launcher |
+| Save Settings | Save all Flow Launcher settings |
+| Restart Flow Launcher | Restart Flow Launcher |
+| Settings | Tweak this app |
+| Reload Plugin Data | Refreshes plugin data with new content |
+| Check For Update | Check for new Flow Launcher update |
+| Open Log Location | Open Flow Launcher's log location |
+| Flow Launcher Tip | Visit Flow Launcher's documentation for more help and how to use tips |
+| Flow Launcher UserData | Open the location where Flow Launcher's settings are stored |
+
+### 💁♂️ Tips
+
+- [More tips](https://flow-launcher.github.io/docs/#/usage-tips)
+
+
+
+## ❔ Questions/Suggestions
+
+Yes please, let us know in the [Q&A](https://github.com/Flow-Launcher/Flow.Launcher/discussions/categories/q-a) section. **Join our community on [Discord](https://discord.gg/AvgAQgh)!**
## Development
@@ -98,8 +270,8 @@ Get in touch if you like to join the Flow-Launcher Team and help build this grea
### Developing/Debugging
-Flow Launcher's target framework is .Net 5
+- Flow Launcher's target framework is .Net 5
-Install Visual Studio 2019
+- Install Visual Studio 2019
-Install .Net 5 SDK via Visual Studio installer or manually from [here](https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-5.0.103-windows-x64-installer)
+- Install .Net 5 SDK via Visual Studio installer or manually from [here](https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-5.0.103-windows-x64-installer)
diff --git a/appveyor.yml b/appveyor.yml
index dba2cf8f9..98323ba7b 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,4 +1,4 @@
-version: '1.8.3.{build}'
+version: '1.9.0.{build}'
init:
- ps: |
@@ -47,7 +47,7 @@ deploy:
- provider: NuGet
artifact: Plugin nupkg
api_key:
- secure: n80IeWR3pN81p0w4uXq4mO0TdTXoJSHHFL+yTB9YBJ0Wni2DjZGYwOFdaWzW4hRi
+ secure: M0FYTgnThhthw9FPAI51CR0l5/te1VSh914YbCtOfDTTLYgbA/Ii9R91sc5l5bAN
on:
APPVEYOR_REPO_TAG: true