Luna/terminal/main.cpp
apio 280b0c90af
Some checks failed
Build and test / build (push) Failing after 1m49s
apps+editor+libui+terminal: Rework the layout system
2024-05-19 14:21:30 +02:00

22 lines
494 B
C++

#include "TerminalWidget.h"
#include <os/ArgumentParser.h>
#include <ui/App.h>
#include <unistd.h>
Result<int> luna_main(int, char**)
{
ui::App app;
TRY(app.init());
auto* window = TRY(ui::Window::create(ui::Rect { 150, 150, 640, 400 }));
app.set_main_window(window);
window->set_title("Terminal");
auto* terminal = TRY(window->create_main_widget<TerminalWidget>());
char* args[] = { "/bin/sh", nullptr };
TRY(terminal->init(args));
return app.run();
}