back to ansii colors
All checks were successful
Deploy to VPS / deploy (push) Successful in 59s

This commit is contained in:
2025-11-06 22:08:17 +01:00
parent b988a7a3b3
commit 570308ae87
3 changed files with 16 additions and 13 deletions

View File

@@ -13,21 +13,24 @@ use std::io::stdout;
fn main() -> Result<(), Box<dyn std::error::Error>> { fn main() -> Result<(), Box<dyn std::error::Error>> {
eprintln!("TUI started"); eprintln!("TUI started");
enable_raw_mode()?; enable_raw_mode()?;
eprintln!("raw mode enabled");
let (width, height) = match crossterm::terminal::size() { let (width, height) = match crossterm::terminal::size() {
Ok((w, h)) if w > 0 && h > 0 => (w, h), Ok((w, h)) if w > 0 && h > 0 => (w, h),
_ => (80, 24), _ => (80, 24),
}; };
println!("Width: {}, Height: {}", width, height); println!("Width: {}, Height: {}", width, height);
let use_alternate_screen = true; let use_alternate_screen = false;
let mut stdout = stdout(); let mut stdout = stdout();
if use_alternate_screen { if use_alternate_screen {
execute!(stdout, EnterAlternateScreen)?; execute!(stdout, EnterAlternateScreen)?;
} }
let backend = CrosstermBackend::new(stdout); let backend = CrosstermBackend::new(stdout);
let mut terminal = Terminal::new(backend)?; let mut terminal = Terminal::new(backend)?;
eprintln!("terminal created");
let mut app = app::App::new(); let mut app = app::App::new();
let mut blink_counter = 0; let mut blink_counter = 0;
eprintln!("entering loop");
loop { loop {
let blink = (blink_counter / 3) % 2 == 0; let blink = (blink_counter / 3) % 2 == 0;

View File

@@ -17,16 +17,16 @@ pub struct Theme {
impl Theme { impl Theme {
pub fn gruvbox_dark() -> Self { pub fn gruvbox_dark() -> Self {
Self { Self {
bg: Color::Rgb(40, 40, 40), bg: Color::Black,
fg: Color::Rgb(235, 219, 178), fg: Color::White,
red: Color::Rgb(204, 36, 29), red: Color::Red,
green: Color::Rgb(152, 151, 26), green: Color::Green,
yellow: Color::Rgb(215, 153, 33), yellow: Color::Yellow,
blue: Color::Rgb(69, 133, 136), blue: Color::Blue,
purple: Color::Rgb(177, 98, 134), purple: Color::Magenta,
aqua: Color::Rgb(104, 157, 106), aqua: Color::Cyan,
orange: Color::Rgb(214, 93, 14), orange: Color::Yellow,
gray: Color::Rgb(146, 131, 116), gray: Color::Gray,
} }
} }
} }

View File

@@ -9,8 +9,8 @@ use ratatui::{
use crate::app::App; use crate::app::App;
pub fn draw(f: &mut Frame, app: &App, blink: bool) { pub fn draw(f: &mut Frame, app: &App, blink: bool) {
// let bg_block = Block::default().style(Style::default().bg(app.theme.bg)); let bg_block = Block::default().style(Style::default().bg(app.theme.bg));
// f.render_widget(bg_block, f.size()); f.render_widget(bg_block, f.size());
if app.show_welcome { if app.show_welcome {
let fg = app.theme.fg; let fg = app.theme.fg;