-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
1,005 additions
and
1,795 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,27 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.7.34221.43 | ||
VisualStudioVersion = 17.8.34511.84 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "windows-terminal-quake", "windows-terminal-quake\windows-terminal-quake.csproj", "{96A07892-69EC-49FB-84C4-3AE678EE3EDE}" | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "windows-terminal-quake", "windows-terminal-quake\windows-terminal-quake.csproj", "{7174B5DC-25D7-413D-B215-14FDC0278D0C}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{1C9CDE72-0E19-42DC-BF4A-D1399AB6AEED}" | ||
ProjectSection(SolutionItems) = preProject | ||
.editorconfig = .editorconfig | ||
.gitignore = .gitignore | ||
azure-pipelines.yml = azure-pipelines.yml | ||
build.cake = build.cake | ||
build.ps1 = build.ps1 | ||
.config\dotnet-tools.json = .config\dotnet-tools.json | ||
EndProjectSection | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Schema", "Schema", "{2A5D241E-3682-411C-8463-3F67346ACFA7}" | ||
ProjectSection(SolutionItems) = preProject | ||
schema\windows-terminal-quake.schema.1.json = schema\windows-terminal-quake.schema.1.json | ||
EndProjectSection | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{629FF3AD-5292-42A3-AE5E-1488D06C8E9F}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{96A07892-69EC-49FB-84C4-3AE678EE3EDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{96A07892-69EC-49FB-84C4-3AE678EE3EDE}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{96A07892-69EC-49FB-84C4-3AE678EE3EDE}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{96A07892-69EC-49FB-84C4-3AE678EE3EDE}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{7174B5DC-25D7-413D-B215-14FDC0278D0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{7174B5DC-25D7-413D-B215-14FDC0278D0C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{7174B5DC-25D7-413D-B215-14FDC0278D0C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{7174B5DC-25D7-413D-B215-14FDC0278D0C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {872F04B6-D29D-4893-A0B9-73253354D678} | ||
SolutionGuid = {65349C7B-F6B3-49A8-9935-4ABF9B6D3D70} | ||
EndGlobalSection | ||
EndGlobal |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...-terminal-quake/Settings/AnimationType.cs → ...inal-quake/Configuration/AnimationType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace WindowsTerminalQuake.Settings; | ||
namespace Wtq.Configuration; | ||
|
||
public enum AnimationType | ||
{ | ||
|
10 changes: 10 additions & 0 deletions
10
windows-terminal-quake/Configuration/CreateProcessOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Wtq.Configuration; | ||
|
||
public class CreateProcessOptions | ||
{ | ||
[NotNull] | ||
[Required] | ||
public string? FileName { get; set; } | ||
|
||
public IEnumerable<string> Arguments { get; set; } = Array.Empty<string>(); | ||
} |
23 changes: 23 additions & 0 deletions
23
windows-terminal-quake/Configuration/FindProcessOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Diagnostics; | ||
|
||
namespace Wtq.Configuration; | ||
|
||
public class FindProcessOptions | ||
{ | ||
public string? ProcessName { get; set; } | ||
|
||
public bool Filter(Process process) | ||
{ | ||
if (process.MainWindowHandle == IntPtr.Zero) | ||
{ | ||
return false; | ||
} | ||
|
||
if (!string.IsNullOrWhiteSpace(ProcessName)) | ||
{ | ||
return process.ProcessName.Equals(ProcessName, StringComparison.OrdinalIgnoreCase); | ||
} | ||
|
||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System.Windows.Forms; | ||
using Wtq.Native; | ||
|
||
namespace Wtq.Configuration; | ||
|
||
public class HotkeyOptions | ||
{ | ||
public Keys Key { get; set; } | ||
|
||
public KeyModifiers Modifiers { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Windows.Forms; | ||
using Wtq.Native; | ||
|
||
namespace Wtq.Configuration; | ||
|
||
public class WtqAppOptions | ||
{ | ||
public IEnumerable<HotkeyOptions> Hotkeys { get; set; } = Array.Empty<HotkeyOptions>(); | ||
|
||
[NotNull] | ||
[Required] | ||
public FindProcessOptions? FindExisting { get; set; } | ||
|
||
[NotNull] | ||
[Required] | ||
public CreateProcessOptions? StartNew { get; set; } | ||
|
||
public bool HasHotkey(Keys key, KeyModifiers modifiers) | ||
{ | ||
return Hotkeys.Any(hk => hk.Key == key && hk.Modifiers == modifiers); | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return FindExisting?.ProcessName ?? StartNew?.FileName ?? "<unknown>"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Wtq.Configuration; | ||
|
||
public sealed class WtqOptions | ||
{ | ||
[Required] | ||
public IEnumerable<WtqAppOptions> Apps { get; set; } = Enumerable.Empty<WtqAppOptions>(); | ||
|
||
[Required] | ||
public IEnumerable<HotkeyOptions> Hotkeys { get; set; } = Enumerable.Empty<HotkeyOptions>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Wtq.Exceptions; | ||
|
||
public sealed class CancelRetryException : Exception | ||
{ | ||
public CancelRetryException() | ||
{ | ||
} | ||
|
||
public CancelRetryException(string message) | ||
: base(message) | ||
{ | ||
} | ||
|
||
public CancelRetryException(string message, Exception innerException) | ||
: base(message, innerException) | ||
{ | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
windows-terminal-quake/Exceptions/WindowsTerminalQuakeException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
global using Polly; | ||
global using Polly.Retry; | ||
global using Serilog; | ||
global using Microsoft.Extensions.Logging; | ||
global using System.Drawing; | ||
global using Wtq.Utils; | ||
global using System; | ||
global using System.Collections.Generic; | ||
global using System.ComponentModel; | ||
global using System.Diagnostics; | ||
global using System.Drawing; | ||
global using System.IO; | ||
global using System.Linq; | ||
global using System.Threading; | ||
global using System.Text; | ||
global using System.Threading.Tasks; | ||
global using System.Windows.Forms; | ||
global using WindowsTerminalQuake.Exceptions; | ||
global using WindowsTerminalQuake.Settings; | ||
global using System.ComponentModel.DataAnnotations; | ||
global using System.Diagnostics.CodeAnalysis; | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.