feat: config file, closes #47
Enable use of a config file, with custom keymap and custom colours
This commit is contained in:
+5
-1
@@ -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"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user