process control
This commit is contained in:
parent
7d149ee17e
commit
a6d501977c
6 changed files with 25 additions and 51 deletions
|
|
@ -141,7 +141,7 @@ fn main() {
|
|||
|
||||
let now = Zoned::now().strftime("%b %e %H:%M:%S");
|
||||
let log_file_path = logs_dir.join(format!("{now}.log"));
|
||||
let log_file = match File::create(&log_file_path) {
|
||||
let _log_file = match File::create(&log_file_path) {
|
||||
Ok(i) => i,
|
||||
Err(e) => {
|
||||
eprintln!(
|
||||
|
|
|
|||
|
|
@ -179,6 +179,12 @@ impl App {
|
|||
(KeyCode::Char('c'), _) if key.modifiers.contains(KeyModifiers::CONTROL) => {
|
||||
return Ok(());
|
||||
}
|
||||
(KeyCode::Char('z'), _) if key.modifiers.contains(KeyModifiers::CONTROL) => {
|
||||
ratatui::restore();
|
||||
let self_pid = nix::unistd::getpid();
|
||||
let _ = nix::sys::signal::kill(self_pid, nix::sys::signal::SIGTSTP);
|
||||
terminal = ratatui::init();
|
||||
}
|
||||
(KeyCode::Esc, _) if num_tabs > 1 => {
|
||||
self.pop_tab();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
use std::io::Write;
|
||||
use std::rc::Rc;
|
||||
|
||||
use crate::tui::{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue