1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2025-04-21 18:03:02 -04:00
picom/data/animation_presets.conf
Yuxuan Shui 8e75ac6b8c
transition: avoid opacity change for fly-out/slide-out presets
Set opacity to window-raw-opacity-before instead of to 1.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-10-10 12:20:57 +01:00

213 lines
6.3 KiB
Text

disappear = {
opacity = {
duration = "placeholder0";
start = "window-raw-opacity-before";
end = "window-raw-opacity";
};
blur-opacity = "opacity";
shadow-opacity = "opacity";
offset-x = "(1 - scale-x) / 2 * window-width";
offset-y = "(1 - scale-y) / 2 * window-height";
scale-x = {
curve = "cubic-bezier(0.21, 0.02, 0.76, 0.36)";
duration = "placeholder0";
start = 1;
end = "placeholder1";
};
scale-y = "scale-x";
shadow-scale-x = "scale-x";
shadow-scale-y = "scale-y";
shadow-offset-x = "offset-x";
shadow-offset-y = "offset-y";
# See comments in tools/animgen.c for syntax
*knobs = {
scale = 0.95;
duration = 0.2;
};
*placeholders = ((0, "duration"),(1, "scale"));
};
appear = {
opacity = {
duration = "placeholder0";
start = "window-raw-opacity-before";
end = "window-raw-opacity";
};
blur-opacity = "opacity";
shadow-opacity = "opacity";
offset-x = "(1 - scale-x) / 2 * window-width";
offset-y = "(1 - scale-y) / 2 * window-height";
scale-x = {
curve = "cubic-bezier(0.24, 0.64, 0.79, 0.98)";
duration = "placeholder0";
start = "placeholder1";
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";
*knobs = {
scale = 0.95;
duration = 0.2;
};
*placeholders = ((0, "duration"),(1, "scale"));
};
slide-out = {
v-timing = {
curve = "cubic-bezier(0.21, 0.02, 0.76, 0.36)";
start = 0;
duration = "placeholder0";
end = "window-width * placeholder1 + window-height * placeholder2";
};
offset-x = "v-timing * placeholder3";
offset-y = "v-timing * (1 - placeholder3)";
shadow-offset-x = "offset-x";
shadow-offset-y = "offset-y";
crop-x = "window-x";
crop-y = "window-y";
crop-width = "window-width";
crop-height = "window-height";
opacity = {
start = "window-raw-opacity-before";
end = "window-raw-opacity-before";
duration = "placeholder0";
};
blur-opacity = "opacity";
shadow-opacity = "opacity";
*knobs = {
duration = 0.2;
direction = (2, ["up", "down", "left", "right"]);
};
*placeholders = (
(0, "duration"),
(1, "direction", [0, 0, -1, 1]),
(2, "direction", [-1, 1, 0, 0]),
(3, "direction", [0, 0, 1, 1]),
);
};
slide-in = {
v-timing = {
curve = "cubic-bezier(0.24, 0.64, 0.79, 0.98)";
start = "window-width * placeholder1 + window-height * placeholder2";
duration = "placeholder0";
end = 0;
};
offset-x = "v-timing * placeholder3";
offset-y = "v-timing * (1 - placeholder3)";
shadow-offset-x = "offset-x";
shadow-offset-y = "offset-y";
crop-x = "window-x";
crop-y = "window-y";
crop-width = "window-width";
crop-height = "window-height";
*knobs = {
duration = 0.2;
direction = (2, ["up", "down", "left", "right"]);
};
*placeholders = (
(0, "duration"),
(1, "direction", [0, 0, -1, 1]),
(2, "direction", [-1, 1, 0, 0]),
(3, "direction", [0, 0, 1, 1]),
);
};
fly-out = {
v-timing = {
curve = "cubic-bezier(0.05, 0, 0.69, -0.05)";
duration = "placeholder0";
start = 0;
end = "window-height * placeholder2 + window-y * placeholder5 + window-width * placeholder1 + window-x * placeholder4";
};
offset-x = "v-timing * placeholder3";
offset-y = "v-timing * (1 - placeholder3)";
shadow-offset-x = "offset-x";
shadow-offset-y = "offset-y";
opacity = {
start = "window-raw-opacity-before";
end = "window-raw-opacity-before";
duration = "placeholder0";
};
shadow-opacity = "opacity";
blur-opacity = "opacity";
*knobs = {
duration = 0.2;
direction = (0, ["up", "down", "left", "right"]);
};
*placeholders = (
(0, "duration"),
(1, "direction", [0, 0, -1, 1]), # left/right -> +1/-1 for X axis
(2, "direction", [-1, 1, 0, 0]), # up/down -> +1/-1 for Y axis
(3, "direction", [0, 0, 1, 1]), # X/Y axis switch
(4, "direction", [0, 0, -1, 0]), # whether window X is added
(5, "direction", [-1, 0, 0, 0]), # whether window Y is added
);
};
fly-in = {
v-timing = {
curve = "cubic-bezier(0.17, 0.67, 0.68, 1.03)";
end = 0;
duration = "placeholder0";
start = "window-height * placeholder2 + window-y * placeholder5 + window-width * placeholder1 + window-x * placeholder4";
};
offset-x = "v-timing * placeholder3";
offset-y = "v-timing * (1 - placeholder3)";
shadow-offset-x = "offset-x";
shadow-offset-y = "offset-y";
*knobs = {
duration = 0.2;
direction = (0, ["up", "down", "left", "right"]);
};
*placeholders = (
(0, "duration"),
(1, "direction", [0, 0, -1, 1]), # left/right -> +1/-1 for X axis
(2, "direction", [-1, 1, 0, 0]), # up/down -> +1/-1 for Y axis
(3, "direction", [0, 0, 1, 1]), # X/Y axis switch
(4, "direction", [0, 0, -1, 0]), # whether window X is added
(5, "direction", [-1, 0, 0, 0]), # whether window Y is added
);
};
geometry-change = {
scale-x = {
curve = "cubic-bezier(0.07, 0.65, 0, 1)";
duration = "placeholder0";
start = "window-width-before / window-width";
end = 1;
};
scale-y = {
curve = "cubic-bezier(0.07, 0.65, 0, 1)";
duration = "placeholder0";
start = "window-height-before / window-height";
end = 1;
};
shadow-scale-x = "scale-x";
shadow-scale-y = "scale-y";
offset-x = {
curve = "cubic-bezier(0.07, 0.65, 0, 1)";
duration = "placeholder0";
start = "window-x-before - window-x";
end = 0;
};
offset-y = {
curve = "cubic-bezier(0.07, 0.65, 0, 1)";
duration = "placeholder0";
start = "window-y-before - window-y";
end = 0;
};
saved-image-blend = {
duration = "placeholder0";
start = 1;
end = 0;
};
shadow-offset-x = "offset-x";
shadow-offset-y = "offset-y";
*knobs = {
duration = 0.4;
};
*placeholders = ((0, "duration"));
};