wtrenderlib 0.1.0

Dependency-free terminal rendering primitives for RGB and RGBA frames
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::render::BackendKind;

pub fn detect_backend() -> BackendKind {
    if std::env::var_os("KITTY_WINDOW_ID").is_some()
        || std::env::var("TERM").is_ok_and(|term| term.contains("kitty"))
    {
        BackendKind::Kitty
    } else {
        BackendKind::Unicode
    }
}