feat: config file, closes #47

Enable use of a config file, with custom keymap and custom colours
This commit is contained in:
Jack Wills
2025-02-16 12:53:54 +00:00
parent 4539d8ad07
commit f4d54e1ba8
37 changed files with 8725 additions and 3879 deletions
+5 -1
View File
@@ -2,13 +2,15 @@ use crate::app_data::DockerCommand;
use std::fmt;
/// app errors to set in global state
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone)]
pub enum AppError {
DockerCommand(DockerCommand),
DockerExec,
DockerLogs,
DockerConnect,
IO(String),
MouseCapture(bool),
Parse(String),
Terminal,
}
@@ -20,10 +22,12 @@ impl fmt::Display for AppError {
Self::DockerExec => write!(f, "Unable to exec into container"),
Self::DockerLogs => write!(f, "Unable to save logs"),
Self::DockerConnect => write!(f, "Unable to access docker daemon"),
Self::IO(msg) => write!(f, "IO error with: {msg}"),
Self::MouseCapture(x) => {
let reason = if *x { "en" } else { "dis" };
write!(f, "Unable to {reason}able mouse capture")
}
Self::Parse(msg) => write!(f, "Parsing error: {msg}"),
Self::Terminal => write!(f, "Unable to fully render to terminal"),
}
}