mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge branch 'dev' into pluginmanagercheckbox
This commit is contained in:
commit
64c2373ecf
32 changed files with 933 additions and 396 deletions
|
|
@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -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<CustomBrowserViewModel> 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
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// when false Alphabet static service will always return empty results
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>2.0.0</Version>
|
||||
<PackageVersion>2.0.0</PackageVersion>
|
||||
<AssemblyVersion>2.0.0</AssemblyVersion>
|
||||
<FileVersion>2.0.0</FileVersion>
|
||||
<Version>2.1.0</Version>
|
||||
<PackageVersion>2.1.0</PackageVersion>
|
||||
<AssemblyVersion>2.1.0</AssemblyVersion>
|
||||
<FileVersion>2.1.0</FileVersion>
|
||||
<PackageId>Flow.Launcher.Plugin</PackageId>
|
||||
<Authors>Flow-Launcher</Authors>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
|
|
|
|||
|
|
@ -226,5 +226,10 @@ namespace Flow.Launcher.Plugin
|
|||
/// <param name="DirectoryPath">Directory Path to open</param>
|
||||
/// <param name="FileName">Extra FileName Info</param>
|
||||
public void OpenDirectory(string DirectoryPath, string FileName = null);
|
||||
|
||||
/// <summary>
|
||||
/// Opens the url. The browser and mode used is based on what's configured in Flow's default browser settings.
|
||||
/// </summary>
|
||||
public void OpenUrl(string url, bool? inPrivate = null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens search as a tab in the default browser chosen in Windows settings.
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -38,6 +38,8 @@
|
|||
<system:String x:Key="ignoreHotkeysOnFullscreenToolTip">Disable Flow Launcher activation when a full screen application is active (Recommended for games).</system:String>
|
||||
<system:String x:Key="defaultFileManager">Default File Manager</system:String>
|
||||
<system:String x:Key="defaultFileManagerToolTip">Select the file manager to use when opening the folder.</system:String>
|
||||
<system:String x:Key="defaultBrowser">Default Web Browser</system:String>
|
||||
<system:String x:Key="defaultBrowserToolTip">Setting for New Tab, New Window, Private Mode.</system:String>
|
||||
<system:String x:Key="pythonDirectory">Python Directory</system:String>
|
||||
<system:String x:Key="autoUpdates">Auto Update</system:String>
|
||||
<system:String x:Key="selectPythonDirectory">Select</system:String>
|
||||
|
|
@ -164,6 +166,16 @@
|
|||
<system:String x:Key="fileManager_directory_arg">Arg For Folder</system:String>
|
||||
<system:String x:Key="fileManager_file_arg">Arg For File</system:String>
|
||||
|
||||
<!-- DefaultBrowser Setting Dialog -->
|
||||
<system:String x:Key="defaultBrowserTitle">Default Web Browser</system:String>
|
||||
<system:String x:Key="defaultBrowser_tips">The default setting follows the OS default browser setting. If specified separately, flow uses that browser.</system:String>
|
||||
<system:String x:Key="defaultBrowser_name">Browser</system:String>
|
||||
<system:String x:Key="defaultBrowser_profile_name">Browser Name</system:String>
|
||||
<system:String x:Key="defaultBrowser_path">Browser Path</system:String>
|
||||
<system:String x:Key="defaultBrowser_newtab">New Window</system:String>
|
||||
<system:String x:Key="defaultBrowser_newWindow">New Tab</system:String>
|
||||
<system:String x:Key="defaultBrowser_parameter">Priviate Mode</system:String>
|
||||
|
||||
<!-- Priority Setting Dialog -->
|
||||
<system:String x:Key="changePriorityWindow">Change Priority</system:String>
|
||||
<system:String x:Key="priority_tips">Greater 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</system:String>
|
||||
|
|
|
|||
|
|
@ -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<Func<int, int, SpecialKeyState, bool>> _globalKeyboardHandlers = new();
|
||||
|
|
|
|||
264
Flow.Launcher/SelectBrowserWindow.xaml
Normal file
264
Flow.Launcher/SelectBrowserWindow.xaml
Normal file
|
|
@ -0,0 +1,264 @@
|
|||
<Window
|
||||
x:Class="Flow.Launcher.SelectBrowserWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Flow.Launcher"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
Title="{DynamicResource defaultBrowserTitle}"
|
||||
Width="550"
|
||||
Background="{DynamicResource PopuBGColor}"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
||||
Foreground="{DynamicResource PopupTextColor}"
|
||||
ResizeMode="NoResize"
|
||||
SizeToContent="Height"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
||||
</WindowChrome.WindowChrome>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="80" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
Grid.Column="4"
|
||||
Click="btnCancel_Click"
|
||||
Style="{StaticResource TitleBarCloseButtonStyle}">
|
||||
<Path
|
||||
Width="46"
|
||||
Height="32"
|
||||
Data="M 18,11 27,20 M 18,20 27,11"
|
||||
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
||||
StrokeThickness="1">
|
||||
<Path.Style>
|
||||
<Style TargetType="Path">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Path.Style>
|
||||
</Path>
|
||||
</Button>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="26,12,26,0">
|
||||
<StackPanel Margin="0,0,0,12">
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
FontFamily="Segoe UI"
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource defaultBrowserTitle}"
|
||||
TextAlignment="Left" />
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
FontSize="14"
|
||||
Text="{DynamicResource defaultBrowser_tips}"
|
||||
TextAlignment="Left"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<StackPanel Margin="14,28,0,0" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource defaultBrowser_name}" />
|
||||
<ComboBox
|
||||
Name="comboBox"
|
||||
Width="200"
|
||||
Height="35"
|
||||
Margin="14,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
ItemsSource="{Binding CustomBrowsers}"
|
||||
SelectedIndex="{Binding SelectedCustomBrowserIndex}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<Button
|
||||
Margin="10,0,0,0"
|
||||
Click="btnAdd_Click"
|
||||
Content="{DynamicResource add}" />
|
||||
<Button
|
||||
Margin="10,0,0,0"
|
||||
Click="btnDelete_Click"
|
||||
Content="{DynamicResource delete}"
|
||||
IsEnabled="{Binding CustomBrowser.Editable}" />
|
||||
|
||||
</StackPanel>
|
||||
<Rectangle
|
||||
Height="1"
|
||||
Margin="0,20,0,12"
|
||||
Fill="{DynamicResource SeparatorForeground}" />
|
||||
<StackPanel
|
||||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
DataContext="{Binding CustomBrowser}"
|
||||
Orientation="Horizontal">
|
||||
<Grid Width="480">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="14,5,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource defaultBrowser_profile_name}" />
|
||||
<TextBox
|
||||
x:Name="ProfileTextBox"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Width="Auto"
|
||||
Margin="10,5,15,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
IsEnabled="{Binding Editable}"
|
||||
Text="{Binding Name}" />
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="14,10,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource defaultBrowser_path}" />
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal">
|
||||
<TextBox
|
||||
x:Name="PathTextBox"
|
||||
Width="220"
|
||||
Margin="10,10,5,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
IsEnabled="{Binding Editable}"
|
||||
Text="{Binding Path}" />
|
||||
<Button
|
||||
Name="btnBrowseFile"
|
||||
Width="80"
|
||||
Margin="0,10,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Click="btnBrowseFile_Click"
|
||||
Content="{DynamicResource selectPythonDirectory}"
|
||||
DockPanel.Dock="Right">
|
||||
<Button.Style>
|
||||
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="{x:Type Button}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=PathTextBox, UpdateSourceTrigger=PropertyChanged, Path=IsEnabled}" Value="False">
|
||||
<Setter Property="IsEnabled" Value="False" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Margin="14,10,14,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<RadioButton IsChecked="{Binding OpenInTab}">New Tab</RadioButton>
|
||||
<RadioButton IsChecked="{Binding OpenInNewWindow, Mode=OneTime}">New Window</RadioButton>
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Margin="14,10,0,20"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource defaultBrowser_parameter}" />
|
||||
<StackPanel
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Margin="0,10,0,15"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBox
|
||||
x:Name="fileArgTextBox"
|
||||
Width="180"
|
||||
Margin="10,0,0,0"
|
||||
Text="{Binding PrivateArg}" />
|
||||
<CheckBox
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
IsChecked="{Binding EnablePrivate}">
|
||||
<CheckBox.Style>
|
||||
<Style BasedOn="{StaticResource DefaultCheckBoxStyle}" TargetType="{x:Type CheckBox}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Text.Length, ElementName=fileArgTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
|
||||
<Setter Property="IsEnabled" Value="False" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</CheckBox.Style>
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Background="{DynamicResource PopupButtonAreaBGColor}"
|
||||
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
|
||||
BorderThickness="0,1,0,0">
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
Width="145"
|
||||
Margin="0,0,5,0"
|
||||
Click="btnCancel_Click"
|
||||
Content="{DynamicResource cancel}" />
|
||||
<Button
|
||||
x:Name="btnDone"
|
||||
Width="145"
|
||||
Margin="5,0,0,0"
|
||||
Click="btnDone_Click"
|
||||
Content="{DynamicResource done}"
|
||||
ForceCursor="True"
|
||||
Style="{DynamicResource AccentButtonStyle}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Window>
|
||||
88
Flow.Launcher/SelectBrowserWindow.xaml.cs
Normal file
88
Flow.Launcher/SelectBrowserWindow.xaml.cs
Normal file
|
|
@ -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<CustomBrowserViewModel> CustomBrowsers { get; set; }
|
||||
|
||||
public CustomBrowserViewModel CustomBrowser => CustomBrowsers[SelectedCustomBrowserIndex];
|
||||
public SelectBrowserWindow(Settings settings)
|
||||
{
|
||||
Settings = settings;
|
||||
CustomBrowsers = new ObservableCollection<CustomBrowserViewModel>(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<bool> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -818,6 +818,30 @@
|
|||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,4,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{DynamicResource SettingTitleLabel}"
|
||||
Text="{DynamicResource defaultBrowser}" />
|
||||
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource defaultBrowserToolTip}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<Button
|
||||
Width="160"
|
||||
MaxWidth="250"
|
||||
Margin="10,0,18,0"
|
||||
Click="OnSelectDefaultBrowserClick"
|
||||
Content="{Binding Settings.CustomBrowser.Name}" />
|
||||
</StackPanel>
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,30,0,0" Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
|
|
|
|||
|
|
@ -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
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 =>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<!--Plugin Info-->
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_plugin_name">Browser Bookmarks</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_plugin_description">Search your browser bookmarks</system:String>
|
||||
<!-- Plugin Info -->
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_plugin_name">Browser Bookmarks</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_plugin_description">Search your browser bookmarks</system:String>
|
||||
|
||||
<!--Settings-->
|
||||
<!-- Settings -->
|
||||
<system:String x:Key="BookmarkDataSetting">Bookmmark Data</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_settings_openBookmarks">Open bookmarks in:</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_settings_newWindow">New window</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_settings_newTab">New tab</system:String>
|
||||
|
|
@ -16,7 +18,7 @@
|
|||
<system:String x:Key="flowlauncher_plugin_browserbookmark_copyurl_subtitle">Copy the bookmark's url to clipboard</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_loadBrowserFrom">Load Browser From:</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserName">Browser Name</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory">DataDirectoryPath</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory">Data Directory Path</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_addBrowserBookmark">Add</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_removeBrowserBookmark">Delete</system:String>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -1,38 +1,130 @@
|
|||
<Window x:Class="Flow.Launcher.Plugin.BrowserBookmark.Views.CustomBrowserSettingWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Plugin.BrowserBookmark.Models"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="CustomBrowserSetting" Height="350" Width="600"
|
||||
KeyDown="WindowKeyDown"
|
||||
>
|
||||
<Window
|
||||
x:Class="Flow.Launcher.Plugin.BrowserBookmark.Views.CustomBrowserSettingWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Plugin.BrowserBookmark.Models"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="{DynamicResource BookmarkDataSetting}"
|
||||
Width="500"
|
||||
Background="{DynamicResource PopuBGColor}"
|
||||
Foreground="{DynamicResource PopupTextColor}"
|
||||
KeyDown="WindowKeyDown"
|
||||
SizeToContent="Height"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
||||
</WindowChrome.WindowChrome>
|
||||
<Window.DataContext>
|
||||
<local:CustomBrowser/>
|
||||
<local:CustomBrowser />
|
||||
</Window.DataContext>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="100"/>
|
||||
<RowDefinition Height="100"/>
|
||||
<RowDefinition Height="60"/>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="80" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Browser Name" FontSize="15"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="80 0 0 0"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Browser Data Directory Path" FontSize="15"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="80 0 0 0"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Name}"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Width="100" Height="30" Margin="50 0 0 0"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding DataDirectoryPath}"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Width="200" Height="30" Margin="50 0 0 0"/>
|
||||
<StackPanel HorizontalAlignment="Center" Grid.Row="2" Orientation="Horizontal" Grid.Column="1" Height="70">
|
||||
<Button Name="btnConfirm" Content="Confirm" Margin="15" Click="ConfirmCancelEditCustomBrowser"/>
|
||||
<Button Content="Cancel" Margin="15" Click="ConfirmCancelEditCustomBrowser"/>
|
||||
|
||||
<StackPanel Grid.Row="0">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
Grid.Column="4"
|
||||
Click="ConfirmCancelEditCustomBrowser"
|
||||
Style="{StaticResource TitleBarCloseButtonStyle}">
|
||||
<Path
|
||||
Width="46"
|
||||
Height="32"
|
||||
Data="M 18,11 27,20 M 18,20 27,11"
|
||||
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
||||
StrokeThickness="1">
|
||||
<Path.Style>
|
||||
<Style TargetType="Path">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Path.Style>
|
||||
</Path>
|
||||
</Button>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="26,0,26,0">
|
||||
<StackPanel Margin="0,0,0,12">
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
FontFamily="Segoe UI"
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource BookmarkDataSetting}"
|
||||
TextAlignment="Left" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="0,10,0,0" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="140"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}" />
|
||||
<TextBox
|
||||
Width="120"
|
||||
Height="30"
|
||||
Margin="50,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Name}" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0,14,0,24" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="140"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}" />
|
||||
<TextBox
|
||||
Width="250"
|
||||
Height="30"
|
||||
Margin="50,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding DataDirectoryPath}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Background="{DynamicResource PopupButtonAreaBGColor}"
|
||||
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
|
||||
BorderThickness="0,1,0,0">
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
Width="145"
|
||||
Height="30"
|
||||
Margin="0,0,5,0"
|
||||
Click="ConfirmCancelEditCustomBrowser"
|
||||
Content="{DynamicResource cancel}" />
|
||||
<Button
|
||||
Name="btnConfirm"
|
||||
Width="145"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
Click="ConfirmCancelEditCustomBrowser"
|
||||
Style="{StaticResource AccentButtonStyle}">
|
||||
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
|||
|
|
@ -10,71 +10,12 @@
|
|||
mc:Ignorable="d">
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="80" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Grid Grid.Row="0" Margin="30,20,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="160" />
|
||||
<ColumnDefinition Width="140" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label
|
||||
Grid.Column="0"
|
||||
Margin="10,5,0,0"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_openBookmarks}"
|
||||
FontSize="15" />
|
||||
<RadioButton
|
||||
Name="NewWindowBrowser"
|
||||
Grid.Column="1"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_newWindow}"
|
||||
IsChecked="{Binding OpenInNewBrowserWindow}" />
|
||||
<RadioButton
|
||||
Name="NewTabInBrowser"
|
||||
Grid.Column="2"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_newTab}"
|
||||
IsChecked="{Binding OpenInNewTab, Mode=OneTime}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Height="60"
|
||||
Margin="30,20,0,0"
|
||||
VerticalAlignment="Top"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
Height="28"
|
||||
Margin="10"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_setBrowserFromPath}" />
|
||||
<TextBox
|
||||
x:Name="BrowserPathBox"
|
||||
Width="240"
|
||||
Height="34"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Settings.BrowserPath}"
|
||||
TextWrapping="NoWrap" />
|
||||
<Button
|
||||
x:Name="ViewButton"
|
||||
Width="100"
|
||||
Height="30"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
Click="OnChooseClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_choose}"
|
||||
FontSize="14" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Margin="30,20,0,0"
|
||||
Orientation="Vertical">
|
||||
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
|
||||
<TextBlock Margin="10" Text="{DynamicResource flowlauncher_plugin_browserbookmark_loadBrowserFrom}" />
|
||||
<ListView
|
||||
Name="CustomBrowsers"
|
||||
Grid.Row="2"
|
||||
Height="auto"
|
||||
Margin="10"
|
||||
BorderBrush="DarkGray"
|
||||
|
|
@ -92,12 +33,12 @@
|
|||
</ListView>
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Button
|
||||
Width="80"
|
||||
Width="110"
|
||||
Margin="10"
|
||||
Click="NewCustomBrowser"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_addBrowserBookmark}" />
|
||||
<Button
|
||||
Width="80"
|
||||
Width="110"
|
||||
Margin="10"
|
||||
Click="DeleteCustomBrowser"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_removeBrowserBookmark}" />
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for BrowserBookmark.xaml
|
||||
/// </summary>
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +1,17 @@
|
|||
<UserControl x:Class="Flow.Launcher.Plugin.Url.SettingsControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="500">
|
||||
<UserControl
|
||||
x:Class="Flow.Launcher.Plugin.Url.SettingsControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Height="0"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="500"
|
||||
mc:Ignorable="d">
|
||||
<Grid Margin="40,40,10,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0">
|
||||
<Label Content="{DynamicResource flowlauncher_plugin_url_open_search_in}" Margin="0 10 15 0" />
|
||||
<RadioButton x:Name="NewWindowBrowser"
|
||||
Content="{DynamicResource flowlauncher_plugin_new_window}" Click="OnNewBrowserWindowClick" />
|
||||
<RadioButton x:Name="NewTabInBrowser"
|
||||
Content="{DynamicResource flowlauncher_plugin_new_tab}" Click="OnNewTabClick" />
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Top" Grid.Row="1" Height="106" Margin="0 20 0 0">
|
||||
<Label Content="{DynamicResource flowlauncher_plugin_url_plugin_set_tip}" Height="28" Margin="0,0,155,0"
|
||||
HorizontalAlignment="Left" Width="290" />
|
||||
<TextBox x:Name="browserPathBox" HorizontalAlignment="Left" Height="34" TextWrapping="NoWrap"
|
||||
VerticalAlignment="Top" Width="311" RenderTransformOrigin="0.502,-1.668" TextChanged="OnBrowserPathTextChanged" />
|
||||
<Button x:Name="viewButton" HorizontalAlignment="Left" Margin="340,-33,-1,0" Width="100"
|
||||
Height="32" Click="OnChooseClick" FontSize="14"
|
||||
Content="{DynamicResource flowlauncher_plugin_url_plugin_choose}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// SettingsControl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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<Settings>();
|
||||
_viewModel = new SettingsViewModel(_settings);
|
||||
|
||||
|
||||
var pluginDirectory = _context.CurrentPluginMetadata.PluginDirectory;
|
||||
var bundledImagesDirectory = Path.Combine(pluginDirectory, Images);
|
||||
|
||||
|
|
|
|||
|
|
@ -37,59 +37,13 @@
|
|||
</UserControl.Resources>
|
||||
<Grid Margin="14,14,14,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="48" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="56" />
|
||||
<RowDefinition Height="50" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Margin="14,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Orientation="Horizontal">
|
||||
<Label Margin="0,15,20,0" Content="{DynamicResource flowlauncher_plugin_websearch_open_search_in}" />
|
||||
<RadioButton
|
||||
Name="NewWindowBrowser"
|
||||
Margin="0,0,20,0"
|
||||
Click="OnNewBrowserWindowClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_websearch_new_window}"
|
||||
GroupName="OpenSearchBehaviour" />
|
||||
<RadioButton
|
||||
Name="NewTabInBrowser"
|
||||
Click="OnNewTabClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_websearch_new_tab}"
|
||||
GroupName="OpenSearchBehaviour" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="14,3,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
Margin="0,0,10,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Content="{DynamicResource flowlaucnher_plugin_websearch_set_browser_path}" />
|
||||
<TextBox
|
||||
x:Name="browserPathBox"
|
||||
Width="250"
|
||||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource BrowserPathBoxStyle}"
|
||||
TextChanged="OnBrowserPathTextChanged" />
|
||||
<Button
|
||||
x:Name="viewButton"
|
||||
Width="80"
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Click="OnChooseClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_websearch_choose}"
|
||||
FontSize="13" />
|
||||
</StackPanel>
|
||||
<ListView
|
||||
x:Name="SearchSourcesListView"
|
||||
Grid.Row="2"
|
||||
Grid.Row="0"
|
||||
Margin="0,18,0,0"
|
||||
BorderBrush="DarkGray"
|
||||
BorderThickness="1"
|
||||
|
|
@ -146,7 +100,7 @@
|
|||
</ListView.View>
|
||||
</ListView>
|
||||
<StackPanel
|
||||
Grid.Row="3"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
|
|
@ -166,7 +120,7 @@
|
|||
Content="{DynamicResource flowlauncher_plugin_websearch_add}" />
|
||||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="4"
|
||||
Grid.Row="2"
|
||||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
BorderBrush="#cecece"
|
||||
|
|
|
|||
|
|
@ -21,9 +21,6 @@ namespace Flow.Launcher.Plugin.WebSearch
|
|||
_context = context;
|
||||
_settings = viewModel.Settings;
|
||||
DataContext = viewModel;
|
||||
browserPathBox.Text = _settings.BrowserPath;
|
||||
NewWindowBrowser.IsChecked = _settings.OpenInNewBrowser;
|
||||
NewTabInBrowser.IsChecked = !_settings.OpenInNewBrowser;
|
||||
}
|
||||
|
||||
private void OnAddSearchSearchClick(object sender, RoutedEventArgs e)
|
||||
|
|
@ -63,34 +60,6 @@ namespace Flow.Launcher.Plugin.WebSearch
|
|||
}
|
||||
}
|
||||
|
||||
private void OnNewBrowserWindowClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_settings.OpenInNewBrowser = true;
|
||||
}
|
||||
|
||||
private void OnNewTabClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_settings.OpenInNewBrowser = false;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
browserPathBox.Text = fileBrowserDialog.FileName;
|
||||
_settings.BrowserPath = fileBrowserDialog.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnBrowserPathTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
_settings.BrowserPath = browserPathBox.Text;
|
||||
}
|
||||
|
||||
GridViewColumnHeader _lastHeaderClicked = null;
|
||||
ListSortDirection _lastDirection = ListSortDirection.Ascending;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
"Name": "Web Searches",
|
||||
"Description": "Provide the web search ability",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "1.4.1",
|
||||
"Version": "1.5.0",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll",
|
||||
|
|
|
|||
278
README.md
278
README.md
|
|
@ -1,86 +1,258 @@
|
|||
<p align="center">
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144854670-d624d717-d86a-49e5-a5e5-e782f91ed12a.png" width="300"><br />
|
||||
<a href="https://flow-launcher.github.io">
|
||||
<img width="500px" src="https://github.com/Flow-Launcher/Flow.Launcher/blob/5ba4514f31e624c679628d4dfe89036c0e24006c/Doc/Logo/resources/flow-header-square-transparent.png">
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144854052-969f5e60-a0ec-44b8-8968-620467496f10.gif" width="500">
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
|
||||

|
||||
[](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)
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/maintenance/yes/3000">
|
||||
<a href="https://crowdin.com/project/flow-launcher"><img src="https://badges.crowdin.net/flow-launcher/localized.svg"></a>
|
||||
<a href="https://ci.appveyor.com/project/JohnTheGr8/flow-launcher/branch/dev"><img src="https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true&retina=true"></a>
|
||||
<a href="https://github.com/Flow-Launcher/Flow.Launcher/releases"><img src="https://img.shields.io/github/downloads/Flow-Launcher/Flow.Launcher/total.svg"></a><br />
|
||||
<img src="https://img.shields.io/github/release-date/Flow-Launcher/Flow.Launcher">
|
||||
<a href="https://github.com/Flow-Launcher/Flow.Launcher/releases/latest"><img src="https://img.shields.io/github/v/release/Flow-Launcher/Flow.Launcher"></a>
|
||||
<a href="https://flow-launcher.github.io/docs"><img src="https://img.shields.io/badge/Documentation-7389D8"></a>
|
||||
<a href="https://discord.gg/AvgAQgh"><img src="https://img.shields.io/discord/727828229250875472?color=7389D8&labelColor=6A7EC2&label=Community&logo=discord&logoColor=white"></a>
|
||||
</p>
|
||||
|
||||
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.
|
||||
<p align="center">
|
||||
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.
|
||||
|
||||
<sub>Remember to star it, flow will love you more :)</sub>
|
||||
<p align="center"> <sub>Remember to star it, flow will love you more :)</sub></p>
|
||||
|
||||
---
|
||||
<p align="center"><img width="12px" src="https://user-images.githubusercontent.com/26427004/104119722-9033c600-5385-11eb-9d57-4c376862fd36.png"> <a href="https://www.softpedia.com/get/System/Launchers-Shutdown-Tools/Flow-Launcher.shtml">SOFTPEDIA EDITOR'S PICK</a></p>
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144858082-8b654daf-60fb-4ee6-89b2-6183b73510d1.png" width="100%">
|
||||
|
||||
|
||||
## 🎉 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
|
||||
- <a href="https://github.com/Flow-Launcher/Flow.Launcher/releases/tag/v1.9.0">Full changelog</a>
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144858082-8b654daf-60fb-4ee6-89b2-6183b73510d1.png" width="100%">
|
||||
|
||||
<h4 align="center">
|
||||
<a href="#Features">Features</a> •
|
||||
<a href="#Getting-Started">Getting Started</a> •
|
||||
<a href="#Getting-Started">Getting Started</a> • <a href="#Features">Features</a> • <a href="#Plugins">Plugins</a> •
|
||||
<a href="#Hotkeys">Hotkeys</a> •
|
||||
<a href="#QuestionsSuggestions">Questions/Suggestions</a> •
|
||||
<a href="#Development">Development</a> •
|
||||
<a href="https://flow-launcher.github.io/docs">Documentation</a>
|
||||
<a href="https://flow-launcher.github.io/docs">Docs</a>
|
||||
</h4>
|
||||
|
||||
---
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144858082-8b654daf-60fb-4ee6-89b2-6183b73510d1.png" width="100%">
|
||||
|
||||
## 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.
|
||||
|
||||
[<img width="12px" src="https://user-images.githubusercontent.com/26427004/104119722-9033c600-5385-11eb-9d57-4c376862fd36.png"> **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: <kbd>Alt</kbd>+<kbd>Space</kbd> is the default hotkey.
|
||||
- Open context menu: on the selected result, press <kbd>Ctrl</kbd>+<kbd>O</kbd>/<kbd>Shift</kbd>+<kbd>Enter</kbd>.
|
||||
- Cancel/Return to previous screen: <kbd>Esc</kbd>.
|
||||
- Install/Uninstall/Update plugins: in the search window, type `pm` `install`/`uninstall`/`update` + the plugin name.
|
||||
And you can download <a href="https://github.com/Flow-Launcher/Flow.Launcher/discussions" target="_blank">early access version</a>.
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144858082-8b654daf-60fb-4ee6-89b2-6183b73510d1.png" width="100%">
|
||||
|
||||
## 🎁 Features
|
||||
|
||||
### Applications & Files
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/145332614-74909973-f6eb-47c2-8235-289931e30718.png" width="400">
|
||||
|
||||
|
||||
- Search for files or their contents.
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/145018796-658b7c24-a34f-46b6-98d4-cf4f636d8b60.png" width="400">
|
||||
|
||||
|
||||
- Support search using environment variable paths.
|
||||
|
||||
### Web Search & Open URL
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144517502-5325de01-d0d9-4c2e-aafb-33c3f5d82f81.png" width="400">
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144831031-0e01e8ea-3247-4ba4-a7b4-48b0db620bc1.png" width="400">
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144517519-79ee8a81-083c-42be-b2d7-4990d1cb53e5.png" width="400">
|
||||
|
||||
### Browser Bookmarks
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144517534-5e27547b-77f8-4718-941c-5bc542eed931.png" width="400">
|
||||
|
||||
### System Commands
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144517557-9b5b82fc-6408-48a0-af59-69b385a0782e.png" width="400">
|
||||
|
||||
- Provides System related commands. shutdown, lock, settings, etc.
|
||||
- <a href="#system-command-list">System command list</a>
|
||||
|
||||
### Calculator
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144517570-f0e62716-3fdf-4f2a-8986-385a3fcd0663.png" width="400">
|
||||
|
||||
- Do mathematical calculations and copy the result to clipboard.
|
||||
|
||||
### Shell Command
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144517582-83da8414-e03d-402c-863d-22d116d20c31.png" width="400">
|
||||
|
||||
- Run batch and PowerShell commands as Administrator or a different user.
|
||||
- Ctrl+Enter to Run as Administrator.
|
||||
|
||||
### Explorer
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144517603-7bfbf868-476a-41d1-bd1b-1ebde7ab2539.png" width="400">
|
||||
|
||||
- Save file or folder locations for quick access.
|
||||
|
||||
### Window Setting & Control Panel
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144982305-42a2f63e-0066-4557-9791-0a1c57495ea7.png" width="400">
|
||||
|
||||
- Search within Window Settings & Control Panel.
|
||||
|
||||
|
||||
### Priority
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144517677-857a2b0a-4b94-4be0-bc89-f35723ecddf9.png" width="500">
|
||||
|
||||
|
||||
- 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-<VersionOfYourFlowLauncher>\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
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144517711-a7396bbb-f7ae-403d-9644-1414edd9e3f1.png" width="150">
|
||||
|
||||
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.
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144858082-8b654daf-60fb-4ee6-89b2-6183b73510d1.png" width="100%">
|
||||
|
||||
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
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144533510-6880ecf4-5f93-4b6a-9c1f-4fcdb99110c3.png" width="400">
|
||||
|
||||
Yes please, let us know in the [Q&A](https://github.com/Flow-Launcher/Flow.Launcher/discussions/categories/q-a) section.
|
||||
### SpotifyPremium
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144533469-da920295-8c36-46e8-89eb-a9cdd94b74ef.png" width="400">
|
||||
|
||||
**Join our community on [Discord](https://discord.gg/AvgAQgh)!**
|
||||
|
||||
### Steam Search
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144533523-afd79dca-a444-40e5-b2d9-6d3fe3aaece1.png" width="400">
|
||||
|
||||
|
||||
### Clipboard History
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144533481-58e473fd-38d9-4604-861f-ad870770967d.png" width="400">
|
||||
|
||||
### Home Assistant Commander
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144533538-3caa2944-3037-4755-87b9-70fa918d2efa.png" width="400">
|
||||
|
||||
### Colors
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144533487-2caff162-a8f6-4577-af3f-d1b05d423ee4.png" width="400">
|
||||
|
||||
### Github
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144533497-8677f800-95c5-4758-8ca3-c96333ee1943.png" width="400">
|
||||
|
||||
### Windows Walker
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144533517-07bf011f-726c-4221-8657-0e442eca8a82.png" width="400">
|
||||
|
||||
......and <a href="https://flow-launcher.github.io/docs/#/plugins">more!</a>
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144858082-8b654daf-60fb-4ee6-89b2-6183b73510d1.png" width="100%">
|
||||
|
||||
### 🛒 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,
|
||||
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144858082-8b654daf-60fb-4ee6-89b2-6183b73510d1.png" width="100%">
|
||||
|
||||
## ⌨️ Hotkeys
|
||||
|
||||
| Hotkey | Description |
|
||||
| ------------------------------------------------------------ | -------------------------------------------- |
|
||||
| <kbd>Alt</kbd>+ <kbd>Space</kbd> | Open Search Box (Default and Configurable) |
|
||||
| <kbd>Enter</kbd> | Execute |
|
||||
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Enter</kbd> | Run As Admin |
|
||||
| <kbd>↑</kbd><kbd>↓</kbd> | Scroll up & Down |
|
||||
| <kbd>←</kbd><kbd>→</kbd> | Back to Result / Open Context Menu |
|
||||
| <kbd>Ctrl</kbd> +<kbd>o</kbd> , <kbd>Shift</kbd> +<kbd>Enter</kbd> | Open Context Menu |
|
||||
| <kbd>Tab</kbd> | Autocomplete |
|
||||
| <kbd>Esc</kbd> | Back to Result & Close |
|
||||
| <kbd>Ctrl</kbd> +<kbd>i</kbd> | Open Setting Window |
|
||||
| <kbd>F5</kbd> | Reload All Plugin Data & Window Search Index |
|
||||
| <kbd>Ctrl</kbd> + <kbd>h</kbd> | 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)
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/6903107/144858082-8b654daf-60fb-4ee6-89b2-6183b73510d1.png" width="100%">
|
||||
|
||||
## ❔ 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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue