11using System ;
2+ using System . Collections . Generic ;
23using System . Collections . ObjectModel ;
34using System . Drawing ;
45using System . Text . Json . Serialization ;
56using Flow . Launcher . Plugin ;
67using Flow . Launcher . Plugin . SharedModels ;
8+ using Flow . Launcher ;
9+ using Flow . Launcher . ViewModel ;
710
811namespace Flow . Launcher . Infrastructure . UserSettings
912{
1013 public class Settings : BaseModel
1114 {
1215 private string language = "en" ;
13-
1416 public string Hotkey { get ; set ; } = $ "{ KeyConstant . Alt } + { KeyConstant . Space } ";
1517 public string OpenResultModifiers { get ; set ; } = KeyConstant . Alt ;
1618 public bool ShowOpenResultHotkey { get ; set ; } = true ;
19+ public double WindowSize { get ; set ; } = 580 ;
20+
1721 public string Language
1822 {
19- get => language ; set
23+ get => language ;
24+ set
2025 {
2126 language = value ;
2227 OnPropertyChanged ( ) ;
@@ -34,6 +39,49 @@ public string Language
3439 public string ResultFontStretch { get ; set ; }
3540 public bool UseGlyphIcons { get ; set ; } = true ;
3641
42+ public int CustomExplorerIndex { get ; set ; } = 0 ;
43+
44+ [ JsonIgnore ]
45+ public CustomExplorerViewModel CustomExplorer
46+ {
47+ get => CustomExplorerList [ CustomExplorerIndex < CustomExplorerList . Count ? CustomExplorerIndex : 0 ] ;
48+ set => CustomExplorerList [ CustomExplorerIndex ] = value ;
49+ }
50+
51+ public List < CustomExplorerViewModel > CustomExplorerList { get ; set ; } = new ( )
52+ {
53+ new ( )
54+ {
55+ Name = "Explorer" ,
56+ Path = "explorer" ,
57+ DirectoryArgument = "\" %d\" " ,
58+ FileArgument = "/select, \" %f\" " ,
59+ Editable = false
60+ } ,
61+ new ( )
62+ {
63+ Name = "Total Commander" ,
64+ Path = @"C:\Program Files\totalcmd\TOTALCMD64.exe" ,
65+ DirectoryArgument = "/O /A /S /T \" %d\" " ,
66+ FileArgument = "/O /A /S /T \" %f\" "
67+ } ,
68+ new ( )
69+ {
70+ Name = "Directory Opus" ,
71+ Path = @"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" ,
72+ DirectoryArgument = "/cmd Go \" %d\" NEW" ,
73+ FileArgument = "/cmd Go \" %f\" NEW"
74+
75+ } ,
76+ new ( )
77+ {
78+ Name = "Files" ,
79+ Path = "Files" ,
80+ DirectoryArgument = "-select \" %d\" " ,
81+ FileArgument = "-select \" %f\" "
82+ }
83+ } ;
84+
3785
3886 /// <summary>
3987 /// when false Alphabet static service will always return empty results
@@ -52,7 +100,7 @@ public string QuerySearchPrecisionString
52100 try
53101 {
54102 var precisionScore = ( SearchPrecisionScore ) Enum
55- . Parse ( typeof ( SearchPrecisionScore ) , value ) ;
103+ . Parse ( typeof ( SearchPrecisionScore ) , value ) ;
56104
57105 QuerySearchPrecision = precisionScore ;
58106 StringMatcher . Instance . UserSettingSearchPrecision = precisionScore ;
0 commit comments