use std::{collections::HashMap, path::PathBuf}; use serde::{Deserialize, Serialize}; use crate::tui::Signal; /// The `RON` representation of the config. This is the schema the config file /// should follow. #[derive(Debug, Deserialize, Serialize)] pub struct RonConfig { /// Directory of the `Filaments` directory. pub directory: PathBuf, /// Keybinds to be used in every part of the TUI pub global_key_binds: HashMap, /// Config for the `ZK` component of the TUI pub zk: ZkConfig, /// Keybinds for the `TODO` component of the TUI pub todo: TodoConfig, } #[derive(Debug, Deserialize, Serialize)] pub struct ZkConfig { pub keybinds: HashMap, } #[derive(Debug, Deserialize, Serialize)] pub struct TodoConfig { pub explorer: ExplorerConfig, pub inspector: InspectorConfig, pub tasklist: TaskListConfig, } #[derive(Debug, Deserialize, Serialize)] pub struct ExplorerConfig { pub keybinds: HashMap, } #[derive(Debug, Deserialize, Serialize)] pub struct InspectorConfig { pub keybinds: HashMap, } #[derive(Debug, Deserialize, Serialize)] pub struct TaskListConfig { pub keybinds: HashMap, }