Formatting fixes

This commit is contained in:
Adam Perkowski 2024-07-19 15:56:09 +02:00
parent 9403f30157
commit 09569ef921
No known key found for this signature in database
GPG Key ID: 7CBDB58ECF1D3478
4 changed files with 9 additions and 7 deletions

View File

@ -156,7 +156,10 @@ impl CustomList {
// node
let list = List::new(items)
.highlight_style(Style::default().reversed())
.block(Block::default().borders(Borders::ALL).title(format!("Linux Toolbox - {}", chrono::Local::now().format("%Y-%m-%d"))))
.block(Block::default().borders(Borders::ALL).title(format!(
"Linux Toolbox - {}",
chrono::Local::now().format("%Y-%m-%d")
)))
.scroll_padding(1);
// Render it
@ -370,4 +373,4 @@ impl CustomList {
fn at_root(&self) -> bool {
self.visit_stack.len() == 1
}
}
}

View File

@ -95,6 +95,5 @@ fn run<B: Backend>(terminal: &mut Terminal<B>) -> io::Result<()> {
}
}
}
}
}

View File

@ -30,7 +30,7 @@ pub struct RunningCommand {
buffer: Arc<Mutex<Vec<u8>>>,
/// A handle of the tread where the command is being executed
command_thread: Option<JoinHandle<ExitStatus>>,
command_thread: Option<JoinHandle<ExitStatus>>,
/// A handle to kill the running process, it's an option because it can only be used once
child_killer: Option<Receiver<Box<dyn ChildKiller + Send + Sync>>>,
@ -279,4 +279,4 @@ impl RunningCommand {
// Send the keycodes to the virtual terminal
let _ = self.writer.write_all(&input_bytes);
}
}
}

View File

@ -31,9 +31,9 @@ pub const THEMES: [Theme; 2] = [
];
pub fn get_theme() -> &'static Theme {
&THEMES[unsafe { THEME_IDX } ]
&THEMES[unsafe { THEME_IDX }]
}
pub fn set_theme(idx: usize){
pub fn set_theme(idx: usize) {
unsafe { THEME_IDX = idx };
}