Skip to content

Add support for configurable terminal modes (Fullscreen and Inline)#4

Merged
patriksvensson merged 2 commits intospectreconsole:mainfrom
phil-scott-78:inline
Jan 26, 2026
Merged

Add support for configurable terminal modes (Fullscreen and Inline)#4
patriksvensson merged 2 commits intospectreconsole:mainfrom
phil-scott-78:inline

Conversation

@phil-scott-78
Copy link
Contributor

You can test it out in Program.cs by passing a new TerminalMode

var terminalMode = new InlineMode(5);
using var terminal = Terminal.Create(terminalMode);

To adjust the size while running tweak this to look for some keys for input

if (Console.KeyAvailable)
{
    var key = Console.ReadKey(true);
    switch (key.Key)
    {
        case ConsoleKey.Q:
            // Time to quit?
            running = false;
            break;
        case ConsoleKey.W:
            terminalMode.SetHeight(Math.Min(terminalMode.Height + 1, 40));
            break;
        case ConsoleKey.S:
            terminalMode.SetHeight(Math.Max(3, terminalMode.Height - 1));
            break;
        }
}

Theoretically Height could have a getter, but I worry I'm being naive about what else might need to happen on that change so felt a method felt more appropriate for setting it for whenever whatever I overlooked comes to head.

@patriksvensson patriksvensson force-pushed the inline branch 2 times, most recently from 0118a15 to b9aaee7 Compare January 26, 2026 18:07
@patriksvensson patriksvensson merged commit cc51c5c into spectreconsole:main Jan 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments