diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-26 02:07:33 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-26 02:07:33 +0300 |
| commit | 3d1ef155bf9846f39725bf22c54666da2bc42330 (patch) | |
| tree | f4b4c3eca6c6f821dbfe86bcee0fd6a5d9ab9da9 /src/config/model.rs | |
| parent | ef4182efd9f15e6c13d91d45e525b094cdcee2fe (diff) | |
feat: add live config reload
Diffstat (limited to 'src/config/model.rs')
| -rw-r--r-- | src/config/model.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/config/model.rs b/src/config/model.rs index e2c39f25..32d60493 100644 --- a/src/config/model.rs +++ b/src/config/model.rs @@ -16,6 +16,20 @@ pub struct ToastConfig { pub delivery: ToastDelivery, } +#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)] +#[serde(rename_all = "snake_case")] +pub enum ConfigReloadStatus { + Applied, + Partial, + Failed, +} + +#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)] +pub struct ConfigReloadReport { + pub status: ConfigReloadStatus, + pub diagnostics: Vec<String>, +} + #[derive(Debug, Default, Deserialize)] #[serde(default)] pub struct Config { @@ -45,6 +59,8 @@ pub struct KeysConfig { pub close_workspace: String, /// Optional explicit detach shortcut in server/client mode. Unset by default. pub detach: String, + /// Reload config.toml in the running app/server. Unset by default. + pub reload_config: String, /// Select the previous workspace. Unset by default. pub previous_workspace: String, /// Select the next workspace. Unset by default. @@ -116,6 +132,7 @@ impl Default for KeysConfig { rename_workspace: "shift+n".into(), close_workspace: "shift+d".into(), detach: "".into(), + reload_config: "".into(), previous_workspace: "".into(), next_workspace: "".into(), new_tab: "c".into(), |
