summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/config/bell.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/config/bell.rs')
-rw-r--r--alacritty_terminal/src/config/bell.rs70
1 files changed, 0 insertions, 70 deletions
diff --git a/alacritty_terminal/src/config/bell.rs b/alacritty_terminal/src/config/bell.rs
deleted file mode 100644
index 825a7b1f..00000000
--- a/alacritty_terminal/src/config/bell.rs
+++ /dev/null
@@ -1,70 +0,0 @@
-use std::time::Duration;
-
-use alacritty_config_derive::ConfigDeserialize;
-
-use crate::config::Program;
-use crate::term::color::Rgb;
-
-#[derive(ConfigDeserialize, Clone, Debug, PartialEq, Eq)]
-pub struct BellConfig {
- /// Visual bell animation function.
- pub animation: BellAnimation,
-
- /// Command to run on bell.
- pub command: Option<Program>,
-
- /// Visual bell flash color.
- pub color: Rgb,
-
- /// Visual bell duration in milliseconds.
- duration: u16,
-}
-
-impl Default for BellConfig {
- fn default() -> Self {
- Self {
- color: Rgb { r: 255, g: 255, b: 255 },
- animation: Default::default(),
- command: Default::default(),
- duration: Default::default(),
- }
- }
-}
-
-impl BellConfig {
- pub fn duration(&self) -> Duration {
- Duration::from_millis(self.duration as u64)
- }
-}
-
-/// `VisualBellAnimations` are modeled after a subset of CSS transitions and Robert
-/// Penner's Easing Functions.
-#[derive(ConfigDeserialize, Clone, Copy, Debug, PartialEq, Eq)]
-pub enum BellAnimation {
- // 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,
-}
-
-impl Default for BellAnimation {
- fn default() -> Self {
- BellAnimation::EaseOutExpo
- }
-}