mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-04 16:10:08 +00:00
* Misc minimize fixes after #3158 * only "iconify" escape sequence support is needed
This commit is contained in:
@@ -276,8 +276,13 @@ internal static class OS {
|
||||
}
|
||||
|
||||
private static void MinimizeConsoleWindow() {
|
||||
// Will work if the terminal supports XTWINOPS sequences, reference: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
|
||||
Console.Write('\x1b' + @"[2;2;2t\r");
|
||||
(_, int top) = Console.GetCursorPosition();
|
||||
|
||||
// Will work if the terminal supports XTWINOPS "iconify" escape sequence, reference: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
|
||||
Console.Write('\x1b' + @"[2;0;0t");
|
||||
|
||||
// Reset cursor position if terminal outputs escape sequences as-is
|
||||
Console.SetCursorPosition(0, top);
|
||||
|
||||
// Fallback if we're using conhost on Windows
|
||||
if (OperatingSystem.IsWindows()) {
|
||||
|
||||
Reference in New Issue
Block a user