config: load beer.toml and apply font, geometry, scrollback, word delimiters

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5008a74307d856f9df472776cb66c8b06a6a6964
This commit is contained in:
raf 2026-06-25 10:23:10 +03:00
commit ccc30d1bbd
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF
7 changed files with 324 additions and 29 deletions

View file

@ -1,5 +1,6 @@
//! beer, a fast, software-rendered, Wayland-native terminal emulator.
mod config;
mod font;
mod grid;
mod input;
@ -8,10 +9,13 @@ mod render;
mod vt;
mod wayland;
use std::path::PathBuf;
use std::process::ExitCode;
use pound::Parse;
use crate::config::Config;
/// A fast, software-rendered, Wayland-native terminal emulator.
#[derive(Parse)]
#[pound(name = "beer", version = "0.0.0")]
@ -19,6 +23,9 @@ struct Cli {
/// Run as a daemon hosting multiple windows.
#[pound(long)]
server: bool,
/// Path to a config file (default: $XDG_CONFIG_HOME/beer/beer.toml).
#[pound(long)]
config: Option<PathBuf>,
}
fn main() -> ExitCode {
@ -51,6 +58,7 @@ fn run(cli: Cli) -> anyhow::Result<ExitCode> {
anyhow::bail!("server mode is not implemented yet");
}
let config = Config::load(cli.config.as_deref());
tracing::info!("starting beer");
wayland::run()
wayland::run(config)
}