wip:handle spawning multiple windows

This commit is contained in:
Chance 2025-03-24 19:42:32 -04:00
parent 36860b4fa5
commit 36431b4654
Signed by: caznix
GPG key ID: 489D213143D753FD
6 changed files with 61 additions and 123 deletions

View file

@ -5,7 +5,6 @@ use std::{
use chrono::Local;
use colored::Colorize;
use log::debug;
use parking_lot::Mutex;
use regex::Regex;
use rustyline::{
@ -13,9 +12,9 @@ use rustyline::{
Hinter, KeyEvent, RepeatCount, Validator, completion::Completer, error::ReadlineError,
highlight::Highlighter, hint::HistoryHinter, history::DefaultHistory,
};
use tracing::{debug, error, info, warn};
use super::handler::COMMAND_MANAGER;
use crate::core::logger::LOGGER;
struct CommandCompleter;
impl CommandCompleter {
@ -89,9 +88,9 @@ impl ConditionalEventHandler for BacktickEventHandler {
if *state { "ON".green() } else { "OFF".red() }
);
if *state {
LOGGER.write_to_stdout();
// LOGGER.write_to_stdout();
} else {
LOGGER.write_to_file("z.log");
// LOGGER.write_to_file("z.log");
}
*state = !*state;
Some(Cmd::Noop)