process control

This commit is contained in:
Jana Dönszelmann 2026-02-25 00:26:07 +01:00
parent 7d149ee17e
commit a6d501977c
No known key found for this signature in database
6 changed files with 25 additions and 51 deletions

View file

@ -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!(

View file

@ -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();
}

View file

@ -1,4 +1,3 @@
use std::io::Write;
use std::rc::Rc;
use crate::tui::{