Webmaster442.WindowsTerminal
4.0.0
dotnet add package Webmaster442.WindowsTerminal --version 4.0.0
NuGet\Install-Package Webmaster442.WindowsTerminal -Version 4.0.0
<PackageReference Include="Webmaster442.WindowsTerminal" Version="4.0.0" />
<PackageVersion Include="Webmaster442.WindowsTerminal" Version="4.0.0" />
<PackageReference Include="Webmaster442.WindowsTerminal" />
paket add Webmaster442.WindowsTerminal --version 4.0.0
#r "nuget: Webmaster442.WindowsTerminal, 4.0.0"
#addin nuget:?package=Webmaster442.WindowsTerminal&version=4.0.0
#tool nuget:?package=Webmaster442.WindowsTerminal&version=4.0.0
Webmaster442.WindowsTerminal
A Windows Terminal Interaction libary
Installation
Via NuGet: https://www.nuget.org/packages/Webmaster442.WindowsTerminal
Via .NET Cli:
dotnet add package Webmaster442.WindowsTerminal
Features
Install a terminal Fragment extension
const string appName = "Webmaster442.WindowsTerminalDemo";
const string fragmentName = "demoApp.json";
if (!Terminal.FragmentExtensions.IsFragmentInstalled(appName, fragmentName))
{
bool result = await Terminal.FragmentExtensions.TryInstallFragmentAsync(appName, fragmentName, new TerminalFragment()
{
Profiles =
{
new TerminalProfile
{
Name = "Webmaster442.WindowsTerminalDemo",
CommandLine = Path.Combine(AppContext.BaseDirectory, "Demo.exe"),
StartingDirectory = EnvironmentVariables.HomePath,
}
}
});
}
else
{
Console.WriteLine("Fragment already installed");
}
Send shell integration marks
Terminal.SetWindowTitle("Shell integration demo");
Terminal.ShellIntegration.StartOfPrompt();
Console.Write("Enter a command >");
Terminal.ShellIntegration.CommandStart();
string? command = Console.ReadLine();
Terminal.ShellIntegration.CommandExecuted();
Console.WriteLine($"Command: {command}");
Terminal.ShellIntegration.CommandFinished(0);
Set window title and Display progress bar:
Terminal.SetWindowTitle("Progressbar demo");
Terminal.SetProgressbar(ProgressbarState.Default, 50);
Write Formatted string to the terminal:
TerminalFormattedStringBuilder builder = new();
Console.WriteLine(builder
.New()
.WithBackgroundColor("#e2eef9")
.WithForegroundColor("#000000")
.WithBold()
.AppendLine("24 bit color")
.ResetFormat());
Create a DECPS sound:
MusicStringBuilder music = new();
music.AddNote(6, TimeSpan.FromSeconds(1), Note.C5);
music.AddNote(6, TimeSpan.FromSeconds(1), Note.D5);
music.AddNote(6, TimeSpan.FromSeconds(1), Note.E5);
music.AddNote(6, TimeSpan.FromSeconds(1), Note.F5);
music.AddNote(6, TimeSpan.FromSeconds(1), Note.G5);
music.AddNote(6, TimeSpan.FromSeconds(1), Note.A5);
music.AddNote(6, TimeSpan.FromSeconds(1), Note.B5);
Console.Write(music.ToString());
Create a Sixel image:
Note : This feature requires the Webmaster442.WindowsTerminal.ImageSharp
or Webmaster442.WindowsTerminal.SkiaSharp
package.
Console.WriteLine($"Sixel is supported: {Terminal.IsSixelSupported}");
var imagePath = Path.Combine(AppContext.BaseDirectory, "512x512.png");
var img = ImageSharpSixelImage.FromFile(imagePath);
Console.Write(img);
var imagePath = Path.Combine(AppContext.BaseDirectory, "512x512.png");
var img = SkiaSharpSixelImage.FromFile(imagePath);
Console.Write(img);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- System.Text.Json (>= 9.0.5)
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Webmaster442.WindowsTerminal:
Package | Downloads |
---|---|
Webmaster442.WindowsTerminal.ImageSharp
A windows terminal interaction libary, adds Sixel encoding via ImageSharp |
|
Webmaster442.WindowsTerminal.SkiaSharp
A windows terminal interaction libary, adds Sixel encoding via ImageSharp |
GitHub repositories
This package is not used by any popular GitHub repositories.