diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 26b89be86..4c62c850b 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -198,7 +198,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
public bool LeaveCmdOpen { get; set; }
public bool HideWhenDeactive { get; set; } = true;
- public bool RememberLastLaunchLocation { get; set; }
+ public string LauncherPosition { get; set; } = "RememberLastLaunchLocation";
public bool IgnoreHotkeysOnFullscreen { get; set; }
public HttpProxy Proxy { get; set; } = new HttpProxy();
@@ -224,4 +224,10 @@ namespace Flow.Launcher.Infrastructure.UserSettings
Light,
Dark
}
+ public enum LauncherPositions
+ {
+ RememberLastLaunchLocation,
+ MouseScreenCenter,
+ MouseScreenCenterTop
+ }
}
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 79afe0998..1a7211bcd 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -33,7 +33,11 @@
Error setting launch on startup
Hide Flow Launcher when focus is lost
Do not show new version notifications
+ Launcher Position
Remember last launch location
+ Remember Last Launch Location
+ Mouse Screen Center
+ Mouse Screen Center Top
Language
Last Query Style
Show/Hide previous results when Flow Launcher is reactivated.
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index bc18d8dbc..3f8ebe0df 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -224,16 +224,21 @@ namespace Flow.Launcher
private void InitializePosition()
{
- if (_settings.RememberLastLaunchLocation)
+ if (_settings.LauncherPosition == "RememberLastLaunchLocation")
{
Top = _settings.WindowTop;
Left = _settings.WindowLeft;
}
- else
+ else if(_settings.LauncherPosition == "MouseScreenCenter")
{
Left = WindowLeft();
Top = WindowTop();
}
+ else if (_settings.LauncherPosition == "MouseScreenCenterTop")
+ {
+ Left = WindowLeft();
+ Top = 0;
+ }
}
private void UpdateNotifyIconText()
@@ -460,23 +465,28 @@ namespace Flow.Launcher
if (_animating)
return;
- if (_settings.RememberLastLaunchLocation)
+ if (_settings.LauncherPosition == "RememberLastLaunchLocation")
{
Left = _settings.WindowLeft;
Top = _settings.WindowTop;
}
- else
+ else if (_settings.LauncherPosition == "MouseScreenCenter")
{
Left = WindowLeft();
Top = WindowTop();
}
+ else if (_settings.LauncherPosition == "MouseScreenCenterTop")
+ {
+ Left = WindowLeft();
+ Top = 0;
+ }
}
private void OnLocationChanged(object sender, EventArgs e)
{
if (_animating)
return;
- if (_settings.RememberLastLaunchLocation)
+ if (_settings.LauncherPosition == "RememberLastLaunchLocation")
{
_settings.WindowLeft = Left;
_settings.WindowTop = Top;
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index 53e4796c5..09757d0e2 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -634,12 +634,27 @@
-
+
-
+
-
+
+
+
+
+
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index 3672053a8..92d3ffe8a 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -355,6 +355,12 @@ namespace Flow.Launcher
}
+ private void LauncherPositionSelectedIndexChanged(object sender, SelectionChangedEventArgs e)
+ {
+
+ }
+
+
private void PreviewClockAndDate(object sender, RoutedEventArgs e)
{
ClockDisplay();
diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
index 733193234..aab84e638 100644
--- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
+++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
@@ -361,6 +361,32 @@ namespace Flow.Launcher.ViewModel
}
}
+
+
+ public class LauncherPosition
+ {
+ public string Display { get; set; }
+ public LauncherPositions Value { get; set; }
+ }
+
+ public List LauncherPositions
+ {
+ get
+ {
+ List modes = new List();
+ var enums = (LauncherPositions[])Enum.GetValues(typeof(LauncherPositions));
+ foreach (var e in enums)
+ {
+ var key = $"LauncherPosition{e}";
+ var display = _translater.GetTranslation(key);
+ var m = new LauncherPosition { Display = display, Value = e, };
+ modes.Add(m);
+ }
+ return modes;
+ }
+ }
+
+
public List TimeFormatList { get; set; } = new List()
{
"hh:mm",