You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The Microsoft Corporation licenses this file to you under the MIT license.
3
+
// See the LICENSE file in the project root for more information. Code forked from Betsegaw Tadele's https://github.com/betsegaw/windowwalker/
// The Microsoft Corporation licenses this file to you under the MIT license.
3
+
// See the LICENSE file in the project root for more information. Code forked from Betsegaw Tadele's https://github.com/betsegaw/windowwalker/
// The Microsoft Corporation licenses this file to you under the MIT license.
3
+
// See the LICENSE file in the project root for more information. Code forked from Betsegaw Tadele's https://github.com/betsegaw/windowwalker/
4
+
5
+
namespaceWindowWalker.Components
6
+
{
7
+
/// <summary>
8
+
/// Command class representing a single command
9
+
/// </summary>
10
+
publicclassCommand
11
+
{
12
+
/// <summary>
13
+
/// Gets or sets the set of substrings to search for in the search text to figure out if the user wants this command
14
+
/// </summary>
15
+
publicstring[]SearchTexts{get;set;}
16
+
17
+
/// <summary>
18
+
/// Gets or sets the help tip to get displayed in the cycling display
// The Microsoft Corporation licenses this file to you under the MIT license.
3
+
// See the LICENSE file in the project root for more information. Code forked from Betsegaw Tadele's https://github.com/betsegaw/windowwalker/
4
+
5
+
usingSystem;
6
+
usingSystem.Collections.Generic;
7
+
usingSystem.Diagnostics;
8
+
usingSystem.Linq;
9
+
10
+
namespaceWindowWalker.Components
11
+
{
12
+
/// <summary>
13
+
/// A class to handle the commands entered by the user, different
14
+
/// form the user being able to search through their windows
15
+
/// </summary>
16
+
internalclassCommands
17
+
{
18
+
/// <summary>
19
+
/// Initializes static members of the <see cref="Commands"/> class.
20
+
/// Constructor primarily used to enforce the creation of tips
21
+
/// and populate the enabled commands list
22
+
/// </summary>
23
+
staticCommands()
24
+
{
25
+
_enabledCommands=newDictionary<string,Command>
26
+
{
27
+
{
28
+
"quit",
29
+
newCommand()
30
+
{
31
+
SearchTexts=newstring[]
32
+
{
33
+
":quit",
34
+
":q",
35
+
},
36
+
Tip="type \":quit\" to exit",
37
+
}
38
+
},
39
+
{
40
+
"launchTerminal",
41
+
newCommand()
42
+
{
43
+
SearchTexts=newstring[]
44
+
{
45
+
":lterminal",
46
+
":lcmd",
47
+
":lterm",
48
+
":lt",
49
+
},
50
+
Tip="type \":lt\" or \":lcmd\"to launch a new terminal window",
51
+
}
52
+
},
53
+
{
54
+
"launchVSCode",
55
+
newCommand()
56
+
{
57
+
SearchTexts=newstring[]
58
+
{
59
+
":lvscode",
60
+
":lcode",
61
+
},
62
+
Tip="type \":lvscode\" or \":lcode\"to launch a new instance of VSCode",
63
+
}
64
+
},
65
+
};
66
+
}
67
+
68
+
/// <summary>
69
+
/// Dictionary containing all the enabled commands
0 commit comments