forked from NotAShelf/beer
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:
parent
9df4e8fb8a
commit
ccc30d1bbd
7 changed files with 324 additions and 29 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue