wip:handle spawning multiple windows
This commit is contained in:
parent
36860b4fa5
commit
36431b4654
6 changed files with 61 additions and 123 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue