Initial GPUI Wayland terminal with Alacritty core

This commit is contained in:
2026-11-17 00:12:24 -08:00
commit de1d5776b6
26 changed files with 10792 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
mod colors;
mod fonts;
mod input;
mod render;
mod session;
mod terminal;
use gpui::{prelude::*, *};
fn main() -> anyhow::Result<()> {
env_logger::init();
let (session, events) = session::Session::new()?;
Application::new().run(move |cx: &mut App| {
cx.on_window_closed(|cx| {
if cx.windows().is_empty() {
cx.quit();
}
})
.detach();
let bounds = Bounds::centered(None, size(px(960.), px(640.)), cx);
cx.open_window(
WindowOptions {
window_bounds: Some(WindowBounds::Windowed(bounds)),
titlebar: Some(TitlebarOptions {
title: Some("Terminal".into()),
..Default::default()
}),
app_id: Some("dev.buzzert.terminal".into()),
..Default::default()
},
move |window, cx| cx.new(|cx| terminal::TerminalView::new(session, events, window, cx)),
)
.expect("could not open terminal window");
cx.activate(true);
});
Ok(())
}