diff options
Diffstat (limited to 'alacritty_terminal/src/config/visual_bell.rs')
-rw-r--r-- | alacritty_terminal/src/config/visual_bell.rs | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/alacritty_terminal/src/config/visual_bell.rs b/alacritty_terminal/src/config/visual_bell.rs index 8981c929..1a0a327b 100644 --- a/alacritty_terminal/src/config/visual_bell.rs +++ b/alacritty_terminal/src/config/visual_bell.rs @@ -8,15 +8,15 @@ use crate::term::color::Rgb; #[serde(default)] #[derive(Deserialize, Clone, Debug, PartialEq, Eq)] pub struct VisualBellConfig { - /// Visual bell animation function + /// Visual bell animation function. #[serde(deserialize_with = "failure_default")] pub animation: VisualBellAnimation, - /// Visual bell duration in milliseconds + /// Visual bell duration in milliseconds. #[serde(deserialize_with = "failure_default")] pub duration: u16, - /// Visual bell flash color + /// Visual bell flash color. #[serde(deserialize_with = "failure_default")] pub color: Rgb, } @@ -32,7 +32,7 @@ impl Default for VisualBellConfig { } impl VisualBellConfig { - /// Visual bell duration in milliseconds + /// Visual bell duration in milliseconds. #[inline] pub fn duration(&self) -> Duration { Duration::from_millis(u64::from(self.duration)) @@ -43,15 +43,25 @@ impl VisualBellConfig { /// Penner's Easing Functions. #[derive(Clone, Copy, Debug, Deserialize, PartialEq, Eq)] pub enum VisualBellAnimation { - Ease, // CSS - EaseOut, // CSS - EaseOutSine, // Penner - EaseOutQuad, // Penner - EaseOutCubic, // Penner - EaseOutQuart, // Penner - EaseOutQuint, // Penner - EaseOutExpo, // Penner - EaseOutCirc, // Penner + // CSS animation. + Ease, + // CSS animation. + EaseOut, + // Penner animation. + EaseOutSine, + // Penner animation. + EaseOutQuad, + // Penner animation. + EaseOutCubic, + // Penner animation. + EaseOutQuart, + // Penner animation. + EaseOutQuint, + // Penner animation. + EaseOutExpo, + // Penner animation. + EaseOutCirc, + // Penner animation. Linear, } |