Skip to content

Commit 5ba4e51

Browse files
committed
Add customized args
1 parent 465146d commit 5ba4e51

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public List<Result> ContextMenus(IPublicAPI api)
326326
{
327327
Main.StartProcess(Process.Start, new ProcessStartInfo(
328328
!string.IsNullOrEmpty(Main._settings.CustomizedExploere)?Main._settings.CustomizedExploere:"exploere"
329-
, Package.Location));
329+
, (Main._settings.CustomizedArgs + " " + ParentDirectory).Trim()));
330330

331331
return true;
332332
},

Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public List<Result> ContextMenus(IPublicAPI api)
142142
{
143143
Main.StartProcess(Process.Start, new ProcessStartInfo(
144144
!string.IsNullOrEmpty(Main._settings.CustomizedExploere)?Main._settings.CustomizedExploere:"exploere"
145-
, ParentDirectory));
145+
, (Main._settings.CustomizedArgs + " " + ParentDirectory).Trim()));
146146
return true;
147147
},
148148
IcoPath = "Images/folder.png"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class Settings
1515

1616
public bool EnableRegistrySource { get; set; } = true;
1717
public string CustomizedExploere { get; set; } = "exploere";
18+
public string CustomizedArgs { get; set; } = "";
1819

1920
internal const char SuffixSeperator = ';';
2021

Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,17 @@
7575
<Button x:Name="btnAddProgramSource" Click="btnAddProgramSource_OnClick" Width="100" Margin="10" Content="{DynamicResource flowlauncher_plugin_program_add}"/>
7676
</StackPanel>
7777
</DockPanel>
78-
<TextBlock Text="Customized Explorer" HorizontalAlignment="Left" Margin="20,0,0,0" Grid.Row="3" VerticalAlignment="Center" FontSize="15"
78+
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Stretch">
79+
<TextBlock Text="Customized Explorer" Margin="10,0,0,0" VerticalAlignment="Center" FontSize="15"
7980
ToolTip="You can customized the exploere for opening the container folder
8081
by inputing the Environmental Variable of the exploere you want to use.
8182
It will be useful to use CMD to test whether the Environmental Variable is avaliable."/>
82-
<TextBox HorizontalAlignment="Right" Margin="0,0,30,0" Grid.Row="3" Text="" TextWrapping="NoWrap" VerticalAlignment="Center" Width="250" Height="30" FontSize="15"
83+
<TextBox Margin="20,0,10,0" TextWrapping="NoWrap" VerticalAlignment="Center" Width="200" Height="30" FontSize="15"
8384
TextChanged="CustomizeExplorer" x:Name="CustomizeExplorerBox"/>
85+
<TextBlock Text="args" VerticalAlignment="Center" FontSize="15"
86+
ToolTip="Enter the customized args you want to add for customized exploere. Check the exploerer websites for detail."></TextBlock>
87+
<TextBox Margin="10,0,0,0" Width="80" Height="30" FontSize="15" x:Name="CustomizeArgsBox" TextChanged="CustomizeExplorerArgs"></TextBox>
88+
</StackPanel>
8489
</Grid>
8590
</UserControl>
8691

Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ private void Setting_Loaded(object sender, RoutedEventArgs e)
4444
RegistryEnabled.IsChecked = _settings.EnableRegistrySource;
4545

4646
CustomizeExplorerBox.Text = _settings.CustomizedExploere;
47+
CustomizeArgsBox.Text = _settings.CustomizedArgs;
4748

4849
ViewRefresh();
4950
}
@@ -333,5 +334,10 @@ private void CustomizeExplorer(object sender, TextChangedEventArgs e)
333334
{
334335
_settings.CustomizedExploere = CustomizeExplorerBox.Text;
335336
}
337+
338+
private void CustomizeExplorerArgs(object sender, TextChangedEventArgs e)
339+
{
340+
_settings.CustomizedArgs = CustomizeArgsBox.Text;
341+
}
336342
}
337343
}

0 commit comments

Comments
 (0)