Skip to content

Commit

Permalink
Added animations for open/close and desktop switching to picom.sample…
Browse files Browse the repository at this point in the history
….conf
  • Loading branch information
pijulius committed May 25, 2024
1 parent 14e5c61 commit 16b1e02
Showing 1 changed file with 196 additions and 0 deletions.
196 changes: 196 additions & 0 deletions picom.sample.conf
Original file line number Diff line number Diff line change
Expand Up @@ -418,3 +418,199 @@ wintypes:
popup_menu = { opacity = 0.8; }
dropdown_menu = { opacity = 0.8; }
};


#################################
# Animation Settings #
#################################

animations = ({
triggers = ["close", "hide"];
opacity = {
timing = "0.2s linear";
start = "window-raw-opacity-before";
end = "window-raw-opacity";
};
blur-opacity = "0";
shadow-opacity = "opacity";
offset-x = "(1 - scale-x) / 2 * window-width";
offset-y = "(1 - scale-y) / 2 * window-height";
scale-x = {
timing = "0.2s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
start = 1;
end = 1.04;
};
scale-y = "scale-x";
shadow-scale-x = "scale-x";
shadow-scale-y = "scale-y";
shadow-offset-x = "offset-x";
shadow-offset-y = "offset-y";
},
{
triggers = ["open", "show"];
opacity = {
timing = "0.2s linear";
start = "window-raw-opacity-before";
end = "window-raw-opacity";
};
blur-opacity = {
timing = "0.1s linear 0.2s";
start = "window-raw-opacity-before";
end = "window-raw-opacity";
};
shadow-opacity = "opacity";
offset-x = "(1 - scale-x) / 2 * window-width";
offset-y = "(1 - scale-y) / 2 * window-height";
scale-x = {
timing = "0.2s cubic-bezier(0.24, 0.64, 0.79, 0.98)";
start = 1.04;
end = 1;
};
scale-y = "scale-x";
shadow-scale-x = "scale-x";
shadow-scale-y = "scale-y";
shadow-offset-x = "offset-x";
shadow-offset-y = "offset-y";
},

# Half Monitor Size Desktop Switching
{
triggers = ["workspace-out"];
offset-y = {
timing = "0.2s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
start = "0";
end = "- window-height / 2";
};
shadow-offset-y = "offset-y";
opacity = {
timing = "0.2s linear";
start = "window-raw-opacity-before";
end = "window-raw-opacity";
};
blur-opacity = "0";
shadow-opacity = "opacity";
},
{
triggers = ["workspace-out-inverse"];
offset-y = {
timing = "0.2s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
start = "0";
end = "window-height / 2";
};
shadow-offset-y = "offset-y";
opacity = {
timing = "0.2s linear";
start = "window-raw-opacity-before";
end = "window-raw-opacity";
};
blur-opacity = "0";
shadow-opacity = "opacity";
},
{
triggers = ["workspace-in"];
offset-y = {
timing = "0.2s cubic-bezier(0.24, 0.64, 0.79, 0.98)";
start = "window-height / 2";
end = "0";
};
shadow-offset-y = "offset-y";
opacity = {
timing = "0.2s linear";
start = "0";
end = "window-raw-opacity";
};
blur-opacity = {
timing = "0.1s linear 0.2s";
start = "0";
end = "window-raw-opacity";
};
shadow-opacity = "opacity";
},
{
triggers = ["workspace-in-inverse"];
offset-y = {
timing = "0.2s cubic-bezier(0.24, 0.64, 0.79, 0.98)";
start = "- window-height / 2";
end = "0";
};
shadow-offset-y = "offset-y";
opacity = {
timing = "0.2s linear";
start = "0";
end = "window-raw-opacity";
};
blur-opacity = {
timing = "0.1s linear 0.2s";
start = "0";
end = "window-raw-opacity";
};
shadow-opacity = "opacity";
}

# Full Opaque & Monitor Size Desktop Switching
#{
# triggers = ["workspace-out"];
# offset-y = {
# timing = "0.15s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
# start = "0";
# end = "-window-monitor-height";
# };
# shadow-offset-y = "offset-y";
# opacity = {
# timing = "0.2s linear";
# start = "window-raw-opacity-before";
# end = "window-raw-opacity-before";
# };
# blur-opacity = "opacity";
# shadow-opacity = "opacity";
#},
#{
# triggers = ["workspace-out-inverse"];
# offset-y = {
# timing = "0.15s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
# start = "0";
# end = "window-monitor-height";
# };
# shadow-offset-y = "offset-y";
# opacity = {
# timing = "0.2s linear";
# start = "window-raw-opacity-before";
# end = "window-raw-opacity-before";
# };
# blur-opacity = "opacity";
# shadow-opacity = "opacity";
#},
#{
# triggers = ["workspace-in"];
# offset-y = {
# timing = "0.15s cubic-bezier(0.24, 0.64, 0.79, 0.98)";
# start = "window-monitor-height";
# end = "0";
# };
# shadow-offset-y = "offset-y";
# opacity = {
# timing = "0.2s linear";
# start = "window-raw-opacity";
# end = "window-raw-opacity";
# };
# blur-opacity = "opacity";
# shadow-opacity = "opacity";
#},
#{
# triggers = ["workspace-in-inverse"];
# offset-y = {
# timing = "0.15s cubic-bezier(0.24, 0.64, 0.79, 0.98)";
# start = "-window-monitor-height";
# end = "0";
# };
# shadow-offset-y = "offset-y";
# opacity = {
# timing = "0.2s linear";
# start = "window-raw-opacity";
# end = "window-raw-opacity";
# };
# blur-opacity = "opacity";
# shadow-opacity = "opacity";
#}

)

0 comments on commit 16b1e02

Please sign in to comment.