From 6424a2738db6349de62dab150d5d6f1d431ca6c4 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 7 Feb 2024 17:05:15 +0400 Subject: Make all animations configurable --- src/layout/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/layout/mod.rs') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 7c381358..c4bcc61f 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -158,6 +158,7 @@ pub struct Options { pub preset_widths: Vec, /// Initial width for new columns. pub default_width: Option, + pub animations: niri_config::Animations, } impl Default for Options { @@ -174,6 +175,7 @@ impl Default for Options { ColumnWidth::Proportion(2. / 3.), ], default_width: None, + animations: Default::default(), } } } @@ -209,6 +211,7 @@ impl Options { center_focused_column: layout.center_focused_column, preset_widths, default_width, + animations: config.animations, } } } @@ -1577,7 +1580,8 @@ impl Layout { monitor.workspace_switch = Some(WorkspaceSwitch::Animation(Animation::new( current_idx, idx as f64, - 250, + self.options.animations.workspace_switch, + niri_config::Animation::default_workspace_switch(), ))); return Some(monitor.output.clone()); -- cgit