From 16b1e026c4c5e88e38ed1ab5cd9c97442007e47b Mon Sep 17 00:00:00 2001 From: Istvan Petres Date: Sat, 25 May 2024 09:48:37 +0300 Subject: [PATCH] Added animations for open/close and desktop switching to picom.sample.conf --- picom.sample.conf | 196 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) diff --git a/picom.sample.conf b/picom.sample.conf index c605af155c..06d977ed34 100644 --- a/picom.sample.conf +++ b/picom.sample.conf @@ -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"; +#} + +)