Skip to content

Commit 814afc7

Browse files
committed
Add option to let process killer show window title
1 parent 652e3bd commit 814afc7

File tree

5 files changed

+18
-1
lines changed

5 files changed

+18
-1
lines changed

Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/en.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<system:String x:Key="flowlauncher_plugin_processkiller_kill_all_count">kill {0} processes</system:String>
1111
<system:String x:Key="flowlauncher_plugin_processkiller_kill_instances">kill all instances</system:String>
1212

13+
<system:String x:Key="flowlauncher_plugin_processkiller_show_window_title">Show title for processes with visible windows</system:String>
1314
<system:String x:Key="flowlauncher_plugin_processkiller_put_visible_window_process_top">Put processes with visible windows on the top</system:String>
1415

1516
</ResourceDictionary>

Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ private List<Result> CreateResultsFromQuery(Query query)
8181
// Filter processes based on search term
8282
var searchTerm = query.Search;
8383
var processlist = new List<ProcessResult>();
84-
var processWindowTitle = ProcessHelper.GetProcessesWithNonEmptyWindowTitle();
84+
var processWindowTitle = Settings.ShowWindowTitle ?
85+
ProcessHelper.GetProcessesWithNonEmptyWindowTitle() :
86+
new Dictionary<int, string>();
8587
if (string.IsNullOrWhiteSpace(searchTerm))
8688
{
8789
foreach (var p in allPocessList)

Plugins/Flow.Launcher.Plugin.ProcessKiller/Settings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
{
33
public class Settings
44
{
5+
public bool ShowWindowTitle { get; set; } = true;
6+
57
public bool PutVisibleWindowProcessesTop { get; set; } = false;
68
}
79
}

Plugins/Flow.Launcher.Plugin.ProcessKiller/ViewModels/SettingsViewModel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ public SettingsViewModel(Settings settings)
99
Settings = settings;
1010
}
1111

12+
public bool ShowWindowTitle
13+
{
14+
get => Settings.ShowWindowTitle;
15+
set => Settings.ShowWindowTitle = value;
16+
}
17+
1218
public bool PutVisibleWindowProcessesTop
1319
{
1420
get => Settings.PutVisibleWindowProcessesTop;

Plugins/Flow.Launcher.Plugin.ProcessKiller/Views/SettingsControl.xaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@
1212
<Grid.ColumnDefinitions />
1313
<Grid.RowDefinitions>
1414
<RowDefinition Height="auto" />
15+
<RowDefinition Height="auto" />
1516
</Grid.RowDefinitions>
1617
<CheckBox
1718
Grid.Row="0"
1819
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
20+
Content="{DynamicResource flowlauncher_plugin_processkiller_show_window_title}"
21+
IsChecked="{Binding ShowWindowTitle}" />
22+
<CheckBox
23+
Grid.Row="1"
24+
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
1925
Content="{DynamicResource flowlauncher_plugin_processkiller_put_visible_window_process_top}"
2026
IsChecked="{Binding PutVisibleWindowProcessesTop}" />
2127
</Grid>

0 commit comments

Comments
 (0)