diff --git a/lua/animations/curves.lua b/lua/animations/curves.lua new file mode 100644 index 0000000..93b5867 --- /dev/null +++ b/lua/animations/curves.lua @@ -0,0 +1,22 @@ +local M = {} + +M.curves = { + { + name = "easeInOutExpo", + curve = { + type = "bezier", + points = { { 0.87, 0 }, { 0.13, 1 } }, + }, + }, + { + name = "rubber", + curve = { + type = "spring", + mass = 1, + stiffness = 50, + dampening = 6, + }, + }, +} + +return M diff --git a/lua/animations/init.lua b/lua/animations/init.lua new file mode 100644 index 0000000..8c82f09 --- /dev/null +++ b/lua/animations/init.lua @@ -0,0 +1,30 @@ +local curves = require("lua.animations.curves") +local M = {} + +M.animations = { + { + leaf = "windows", + enabled = true, + speed = 1, + spring = "rubber", + style = "slide", + }, + { + leaf = "workspaces", + enabled = true, + speed = 8, + spring = "rubber", + }, +} + +function M.load() + for _, curve_item in pairs(curves.curves) do + hl.curve(curve_item.name, curve_item.curve) + end + + for _, animation in pairs(M.animations) do + hl.animation(animation) + end +end + +return M diff --git a/lua/conf/init.lua b/lua/conf/init.lua index 1975c84..7c13073 100644 --- a/lua/conf/init.lua +++ b/lua/conf/init.lua @@ -15,3 +15,4 @@ require("lua.conf.layerrules").load() require("lua.binds").load() require("lua.modules").load() +require("lua.animations").load()