Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Flow.Launcher.Infrastructure/UserSettings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,21 @@ public bool ShowAtTopmost
}
}

private bool _autoTopmostLastOpenedResults = false;
public bool AutoTopmostLastOpenedResult
{
get => _autoTopmostLastOpenedResults;
set
{
if (_autoTopmostLastOpenedResults != value)
{
_autoTopmostLastOpenedResults = value;
OnPropertyChanged();
}
}
}


public bool SearchQueryResultsWithDelay { get; set; }
public int SearchDelayTime { get; set; } = 150;

Expand Down
2 changes: 2 additions & 0 deletions Flow.Launcher/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<system:String x:Key="restartToDisablePortableMode">Flow Launcher needs to restart to finish disabling portable mode, after the restart your portable data profile will be deleted and roaming data profile kept</system:String>
<system:String x:Key="restartToEnablePortableMode">Flow Launcher needs to restart to finish enabling portable mode, after the restart your roaming data profile will be deleted and portable data profile kept</system:String>
<system:String x:Key="moveToDifferentLocation">Flow Launcher has detected you enabled portable mode, would you like to move it to a different location?</system:String>
<system:String x:Key="shortcutsUninstallerCreated">Flow Launcher has detected you disabled portable mode, the relevant shortcuts and uninstaller entry have been created</system:String>

Check warning on line 25 in Flow.Launcher/Languages/en.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`uninstaller` is not a recognized word. (unrecognized-spelling)
<system:String x:Key="userDataDuplicated">Flow Launcher detected your user data exists both in {0} and {1}. {2}{2}Please delete {1} in order to proceed. No changes have occurred.</system:String>

<!-- Plugin Loader -->
Expand Down Expand Up @@ -81,8 +81,8 @@
<system:String x:Key="useLogonTaskForStartupTooltip">After uninstallation, you need to manually remove this task (Flow.Launcher Startup) via Task Scheduler</system:String>
<system:String x:Key="setAutoStartFailed">Error setting launch on startup</system:String>
<system:String x:Key="hideFlowLauncherWhenLoseFocus">Hide Flow Launcher when focus is lost</system:String>
<system:String x:Key="showTaskbarWhenOpened">Show taskbar when Flow Launcher is opened</system:String>

Check warning on line 84 in Flow.Launcher/Languages/en.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`taskbar` is not a recognized word. (unrecognized-spelling)
<system:String x:Key="showTaskbarWhenOpenedToolTip">Temporarily show the taskbar when Flow Launcher is opened, useful for auto-hidden taskbars.</system:String>

Check warning on line 85 in Flow.Launcher/Languages/en.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`taskbars` is not a recognized word. (unrecognized-spelling)

Check warning on line 85 in Flow.Launcher/Languages/en.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`taskbar` is not a recognized word. (unrecognized-spelling)
<system:String x:Key="dontPromptUpdateMsg">Do not show new version notifications</system:String>
<system:String x:Key="SearchWindowPosition">Search Window Location</system:String>
<system:String x:Key="SearchWindowScreenRememberLastLaunchLocation">Remember Last Position</system:String>
Expand Down Expand Up @@ -179,6 +179,8 @@
<system:String x:Key="homeToggleBoxToolTip">This can only be edited if plugin supports Home feature and Home Page is enabled.</system:String>
<system:String x:Key="showAtTopmost">Show Search Window at Foremost</system:String>
<system:String x:Key="showAtTopmostToolTip">Overrides other programs' 'Always on Top' setting and displays Flow in the foremost position.</system:String>
<system:String x:Key="autoTopmostLastOpenedResult">Auto Topmost Results</system:String>
<system:String x:Key="autoTopmostLastOpenedResultToolTip">Automatically mark selected results as topmost in their queries for faster access in future searches.</system:String>
<system:String x:Key="autoRestartAfterChanging">Restart after modifying plugin via Plugin Store</system:String>
<system:String x:Key="autoRestartAfterChangingToolTip">Restart Flow Launcher automatically after installing/uninstalling/updating plugin via Plugin Store</system:String>
<system:String x:Key="showUnknownSourceWarning">Show unknown source warning</system:String>
Expand Down
14 changes: 14 additions & 0 deletions Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ext="clr-namespace:Flow.Launcher.Resources.MarkupExtensions"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"

Check warning on line 9 in Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`ikw` is not a recognized word. (unrecognized-spelling)
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:settingsViewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
Expand Down Expand Up @@ -106,6 +106,20 @@
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>

<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource autoTopmostLastOpenedResultToolTip}"
Header="{DynamicResource autoTopmostLastOpenedResult}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xf5ed;" />
</ui:SettingsCard.HeaderIcon>

<ui:ToggleSwitch
IsOn="{Binding Settings.AutoTopmostLastOpenedResult}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>

<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource SearchWindowPosition}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe7f4;" />
Expand Down
6 changes: 4 additions & 2 deletions Flow.Launcher/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
Priority = 0 // Priority is for calculating scores in UpdateResultView
};

private bool _taskbarShownByFlow = false;

Check warning on line 67 in Flow.Launcher/ViewModel/MainViewModel.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`taskbar` is not a recognized word. (unrecognized-spelling)

#endregion

Expand Down Expand Up @@ -544,12 +544,14 @@

// Record user selected result for result ranking
_userSelectedRecord.Add(result);
// Add item to history only if it is from results but not context menu or history
// Add item to history and topmost only if it is from results but not context menu or history
if (queryResultsSelected)
{
_history.Add(result);
lastHistoryIndex = 1;
}
if (Settings.AutoTopmostLastOpenedResult)
_topMostRecord.AddOrUpdate(result);
}
}

private static IReadOnlyList<Result> DeepCloneResults(IReadOnlyList<Result> results, bool isDialogJump, CancellationToken token = default)
Expand Down Expand Up @@ -2144,8 +2146,8 @@
Win32Helper.SwitchToEnglishKeyboardLayout(true);
}

// Show the taskbar if the setting is enabled

Check warning on line 2149 in Flow.Launcher/ViewModel/MainViewModel.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`taskbar` is not a recognized word. (unrecognized-spelling)
if (Settings.ShowTaskbarWhenInvoked && !_taskbarShownByFlow)

Check warning on line 2150 in Flow.Launcher/ViewModel/MainViewModel.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`taskbar` is not a recognized word. (unrecognized-spelling)
{
Win32Helper.ShowTaskbar();
_taskbarShownByFlow = true;
Expand Down
Loading