From 570308ae87823006dc89a1d7de86745c5cd4cc40 Mon Sep 17 00:00:00 2001 From: dcorral Date: Thu, 6 Nov 2025 22:08:17 +0100 Subject: [PATCH] back to ansii colors --- src/main.rs | 5 ++++- src/theme.rs | 20 ++++++++++---------- src/ui.rs | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5c4ef9e..7d0120b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,21 +13,24 @@ use std::io::stdout; fn main() -> Result<(), Box> { eprintln!("TUI started"); enable_raw_mode()?; + eprintln!("raw mode enabled"); let (width, height) = match crossterm::terminal::size() { Ok((w, h)) if w > 0 && h > 0 => (w, h), _ => (80, 24), }; println!("Width: {}, Height: {}", width, height); - let use_alternate_screen = true; + let use_alternate_screen = false; let mut stdout = stdout(); if use_alternate_screen { execute!(stdout, EnterAlternateScreen)?; } let backend = CrosstermBackend::new(stdout); let mut terminal = Terminal::new(backend)?; + eprintln!("terminal created"); let mut app = app::App::new(); let mut blink_counter = 0; + eprintln!("entering loop"); loop { let blink = (blink_counter / 3) % 2 == 0; diff --git a/src/theme.rs b/src/theme.rs index 6609b82..4484afd 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -17,16 +17,16 @@ pub struct Theme { impl Theme { pub fn gruvbox_dark() -> Self { Self { - bg: Color::Rgb(40, 40, 40), - fg: Color::Rgb(235, 219, 178), - red: Color::Rgb(204, 36, 29), - green: Color::Rgb(152, 151, 26), - yellow: Color::Rgb(215, 153, 33), - blue: Color::Rgb(69, 133, 136), - purple: Color::Rgb(177, 98, 134), - aqua: Color::Rgb(104, 157, 106), - orange: Color::Rgb(214, 93, 14), - gray: Color::Rgb(146, 131, 116), + bg: Color::Black, + fg: Color::White, + red: Color::Red, + green: Color::Green, + yellow: Color::Yellow, + blue: Color::Blue, + purple: Color::Magenta, + aqua: Color::Cyan, + orange: Color::Yellow, + gray: Color::Gray, } } } diff --git a/src/ui.rs b/src/ui.rs index 378a194..03aec85 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -9,8 +9,8 @@ use ratatui::{ use crate::app::App; pub fn draw(f: &mut Frame, app: &App, blink: bool) { - // let bg_block = Block::default().style(Style::default().bg(app.theme.bg)); - // f.render_widget(bg_block, f.size()); + let bg_block = Block::default().style(Style::default().bg(app.theme.bg)); + f.render_widget(bg_block, f.size()); if app.show_welcome { let fg = app.theme.fg;