Skip to content

webmaster442.windowsterminal.terminal

webmaster442 edited this page Jun 9, 2025 · 2 revisions

< Back


Terminal

Namespace: Webmaster442.WindowsTerminal

Windows terminal interaction class

public static class Terminal

Inheritance Object → Terminal

Properties

IsOutputUtf8

Checks if the current output is UTF8 or not

public static bool IsOutputUtf8 { get; }

Property Value

Boolean

IsSixelSupported

Check if sixel is supported

public static bool IsSixelSupported { get; }

Property Value

Boolean

Methods

GetCurrentSessionId()

Get the current session id

public static string GetCurrentSessionId()

Returns

String
The current windows Session id. Returns null, if program is not running in Windows Terminal

GetPaletteColor(Int32)

Get the specified color of the current terminal palette

public static ValueTuple<byte, byte, byte> GetPaletteColor(int colorIndex)

Parameters

colorIndex Int32
Color index to get. Must be between 0 and 15

Returns

ValueTuple<Byte, Byte, Byte>
24 bit RGB color

IsRunningInsideWindowsTerminal()

Check if the current program is running inside the Windows Terminal

public static bool IsRunningInsideWindowsTerminal()

Returns

Boolean
True, if App is running inside windows terminal

SetProgressbar(ProgressbarState, Int32)

Set the progressbar state

public static void SetProgressbar(ProgressbarState progressbarState, int value)

Parameters

progressbarState ProgressbarState
Progress bar state

value Int32
progress bar value

SetWindowTitle(String)

Set the window title

public static void SetWindowTitle(string title)

Parameters

title String
Title to set

SwitchToAlternateBuffer()

Switch to alternate buffer

public static void SwitchToAlternateBuffer()

SwitchToMainBuffer()

Switch to main buffer

public static void SwitchToMainBuffer()

GetTerminalWindowSize()

Get the terminal window size in pixels

public static ValueTuple<int, int> GetTerminalWindowSize()

Returns

ValueTuple<Int32, Int32>
A value tuple with the terminal window size


< Back

Documentation

Clone this wiki locally