mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
The GUI terminal recognised four hardcoded strings and answered everything else
with "Executed: '<cmd>'". It now dispatches to the same LazyBox applet table and
shell builtins the kernel TTY uses, so ls, free, uname, lspci, ktest, neofetch,
sort, cd and the rest all work, with cwd tracked across commands.
LazyBox reports through printk, so before running a command the terminal
installs a printk sink and streams the output into its own scrollback:
- ANSI SGR codes become per-line colours instead of being stripped.
- CP437 box-drawing and block characters fall back to ASCII, so the colour
swatch in neofetch renders as '#' rather than a row of '?'.
- 256 lines of scrollback, command history on Up/Down, PgUp/PgDn/Home/End.
- Applets that read the keyboard directly (nano, snake, sh, top) are refused
with a pointer to the TTY, since they would block the compositor.
The window's paint and event handlers moved out of gui_apps.c into
gui/gui_terminal.c, and gui_gfx.c now draws from the shared lib/font8x8.c table
rather than its own copy.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01L5yKJT4Wo2cV3rfPrwY5MP
13 lines
386 B
C
13 lines
386 B
C
#ifndef _GUI_TERMINAL_H
|
|
#define _GUI_TERMINAL_H
|
|
|
|
#include <gui/gui_wm.h>
|
|
|
|
// Desktop terminal emulator. Commands are dispatched to the real LazyBox
|
|
// applet table, and the applet's printk output is captured and rendered in
|
|
// the window, so the GUI terminal runs the same tools the kernel TTY does.
|
|
|
|
void gui_app_terminal_launch(int x, int y, int w, int h);
|
|
|
|
#endif // _GUI_TERMINAL_H
|