feat: handle spawning multiple windows

This commit is contained in:
Chance 2025-03-24 19:42:32 -04:00 committed by BitSyndicate
parent 8ca8dfd370
commit 09f7d4d4f8
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 443E4198D6BBA6DE
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)