Skip to content

Commit

Permalink
zap: Add dedicated duration option
Browse files Browse the repository at this point in the history
  • Loading branch information
soreau committed Aug 27, 2024
1 parent f2e9115 commit d8d02cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions metadata/animate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,10 @@
<_long>Sets the duration of the squeezimize animation in milliseconds.</_long>
<default>150ms linear</default>
</option>
<option name="zap_duration" type="animation">
<_short>Zap duration</_short>
<_long>Sets the duration for the zap animation in milliseconds.</_long>
<default>250ms linear</default>
</option>
</plugin>
</wayfire>
5 changes: 4 additions & 1 deletion plugins/animate/zap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#include <wayfire/output.hpp>

static const std::string zap_transformer_name = "zap-transformer";

wf::option_wrapper_t<wf::animation_description_t> zap_duration{"animate/zap_duration"};

namespace wf
{
namespace zap
Expand All @@ -54,7 +57,7 @@ class zap_animation : public animation_base
this->view = view;
this->type = type;
this->progression =
wf::zap::zap_animation_t(wf::create_option<wf::animation_description_t>(dur));
wf::zap::zap_animation_t(wf::create_option<wf::animation_description_t>(zap_duration));

if (type & HIDING_ANIMATION)
{
Expand Down

0 comments on commit d8d02cc

Please sign in to comment.