Skip to main content

par_term_config/config/config_struct/
integration_config.rs

1//! Shader and shell integration install state.
2//!
3//! Extracted from the top-level [`super::Config`] struct via `#[serde(flatten)]`.
4//! All fields serialise at the top level of the YAML config file -- existing
5//! config files remain 100% compatible.
6
7use crate::types::{InstallPromptState, IntegrationVersions, ShaderInstallPrompt};
8use serde::{Deserialize, Serialize};
9
10/// Install prompts and version tracking for bundled shaders and shell integration.
11#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12pub struct IntegrationConfig {
13    /// Shader install prompt preference
14    /// - ask: Prompt user to install shaders if folder is missing/empty (default)
15    /// - never: User declined, don't ask again
16    /// - installed: Shaders have been installed
17    #[serde(default)]
18    pub shader_install_prompt: ShaderInstallPrompt,
19
20    /// Shell integration install state
21    #[serde(default)]
22    pub shell_integration_state: InstallPromptState,
23
24    /// Version tracking for integrations
25    #[serde(default)]
26    pub integration_versions: IntegrationVersions,
27}