Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

animations #1121

Open
absolutelynothelix opened this issue Sep 2, 2023 · 93 comments
Open

animations #1121

absolutelynothelix opened this issue Sep 2, 2023 · 93 comments
Labels
discussion Not a bug feature Feature request help wanted SOMEBODY PLEASE HELP
Milestone

Comments

@absolutelynothelix
Copy link
Collaborator

absolutelynothelix commented Sep 2, 2023

since there are multiple open issues requesting animations i decided to group them into a single issue to have a more or less centralized discussion, ease the progress tracking and reduce the amount of open issues.

there is also a thread in the #development channel on the discord server to ease the communication between developers interested in implementing animations.

feel free to reserve one of the first posts in this issue if you're interested in structuring it even more.

related issues:

related discussions:

  • todo.

related pull requests:

forks that implement animations:

  • todo.

feel free to post here or ping me on the discord server about additions to the lists above.

@ghost
Copy link

ghost commented Sep 2, 2023

Forks that implements animation:
https://github.com/pijulius/picom (Best animation)
https://github.com/jonaburg/picom {Slight animation changes}
https://github.com/FT-Labs/picom (Intended for his own fork of dwm)
https://github.com/fdev31/picom (Fork of FT-Labs Picom which somewhat work better than FT-Labs picom)
Thats all i can remember lol

@dccsillag
Copy link

dccsillag commented Sep 2, 2023

... and mine, https://github.com/dccsillag/picom, which is what pijulius, FT-Labs and fdev31 forked from (and what the long-standing PR #772 was from).

@ghost
Copy link

ghost commented Sep 3, 2023

Oh yeah i kinda forgot about yours.... Thanks for reminding me though :D

@NotMurPh
Copy link

NotMurPh commented Sep 22, 2023

i can't check out the discord thread, looks like the invitation link has expired! i would be happy to hear an update about picom animations 🫠

@absolutelynothelix
Copy link
Collaborator Author

i can't check out the discord thread, looks like the invitation link has expired!

thanks for pointing out. i copied it from the discord badge in the readme but it turned out that it wasn't updated when it was changed so i updated it both in the readme and here.

i would be happy to hear an update about picom animations 🫠

unfortunately, there are no updates.

@allusive-dev
Copy link

allusive-dev commented Oct 3, 2023

Still want animation support.

Done.

Here is my public, actively maintained, on the AUR fork of pijulius picom.

Now on NixOS and Nixpkgs and I am always looking to add new features.

Links:

https://github.com/allusive-dev/picom-allusive
https://wiki.archlinux.org/title/Picom_Allusive
https://aur.archlinux.org/packages/picom-allusive
NixOS

@yshui
Copy link
Owner

yshui commented Dec 26, 2023

Hi, I want to quickly ( 🤞 ) merge animation support after v11 release (which should be in the next few weeks, again 🤞 ).

looks like @FT-Labs' fork is the most comprehensive one? so maybe i will consolidate all the PR's around that.

now, I realized I never asked if @FT-Labs wants to merge their branch into this repo, i just assumed they do 😅 I will still do this either way (these are all open source after all), but if @FT-Labs wants to, we can work together and sort this all out faster than I can with only current picom developers.

@yshui
Copy link
Owner

yshui commented Dec 26, 2023

And if @FT-Labs's fork has missing features, or there is another fork I need to look at, or something, please leave a comment.

@yshui
Copy link
Owner

yshui commented Dec 26, 2023

And I would definitely appreciate @dccsillag's help as well if he has more time and is able to.

@FT-Labs
Copy link

FT-Labs commented Dec 28, 2023

Hello @yshui,

Yes, I'm totally up for it. That would be great, because this is a work that needs more than 1 person. Any help would be appreciated, I would be glad to explain what I have done until now and explain all of the steps.

@jasper-at-windswept
Copy link

jasper-at-windswept commented Jan 12, 2024

@yshui
I've forked the next branch and implemented the animations from Compfy which came from pijulius which are modified from dccsilag.
If you want me to make a PR let me know.
https://github.com/jasper-at-windswept/picom

@dccsillag
Copy link

dccsillag commented Jan 12, 2024

And I would definitely appreciate @dccsillag's help as well if he has more time and is able to.

I'd be happy to help. (Still a bit strained for time, though!)

@zeorin
Copy link

zeorin commented Jan 14, 2024

I tried out @jasper-at-windswept's fork because I was curious, and the animations are cool, but the following would need some work, imo:

  • interaction with shaders, currently the shader is unapplied and then only reapplies a bit after the animation has finished.
  • interaction with blur and shadows, currently the shadows lag behind the actual window's animation and the space in between blurred.
  • interaction with mouse-driven changes to window position and size

It would also be great to be able to set all animation settings using rules, rather than only being able to exclude windows from opening and unmapping animations. This would allow one tweak animations in a very fine-grained way, it'd be great for e.g. menus, docks, launchers, notifications, etc.

Here is a recording (i3wm):

picom-animations.mp4

For reference, my config is here: https://github.com/zeorin/dotfiles/blob/07f0c9bf789f8baebc40afd3b06c5586b7a0caf8/home-manager/home.nix#L2618-L2803

@yshui
Copy link
Owner

yshui commented Jan 14, 2024

@jasper-at-windswept I intend to take from @FT-Labs 's fork, as IIUC it is the most up-to-date version.

@yshui
Copy link
Owner

yshui commented Jan 14, 2024

Hello @yshui,

Yes, I'm totally up for it. That would be great, because this is a work that needs more than 1 person. Any help would be appreciated, I would be glad to explain what I have done until now and explain all of the steps.

Hi, can you open a PR from your branch?

@jasper-at-windswept
Copy link

@jasper-at-windswept I intend to take from @FT-Labs 's fork, as IIUC it is the most up-to-date version.

No problem. Looking forward to animations in v11!

@DarioDarko

This comment was marked as off-topic.

@XoDefender
Copy link

Also feel free to try out my fork, it is based on FT-Labs and has animation customization throughout: rules, xprop, wintypes. May be helpful to take particular parts from it (https://github.com/XoDefender/picom)

@yshui
Copy link
Owner

yshui commented Aug 29, 2024

@0neGal i am looking into the unredir issue. but it looks like when the screen is unredirected, animation already doesn't start.

do you have steps for how to reproduce this issue?

@0neGal
Copy link

0neGal commented Aug 29, 2024

@0neGal i am looking into the unredir issue. but it looks like when the screen is unredirected, animation already doesn't start.

do you have steps for how to reproduce this issue?

Hmm, didn't test this originally, so thought it was a general unredir and animation issue, but I can't actually reproduce it very well with certain configs, here however is one that does reproduce it:

Barebones config
backend = "glx";
unredir-if-possible = true;

rules = (
	# this just makes it easier to notice the unredir
	{ opacity = 0.9; match = "class_g %= '*'"; },

	{ opacity = 1.0; match = "fullscreen"; },
	{ unredir = true; match = "_NET_WM_BYPASS_COMPOSITOR = 1"; }

)

animations = (
	{
		duration = 0.2;
		triggers = ["open", "show"];

		opacity = {
			start = 0;  end = "window-raw-opacity";
			duration = "duration"; curve = "linear";
		}
	},
	{
		duration = 0.2;
		triggers = ["close", "hide"];

		opacity = {
			start = 0.8; end = 0;
			duration = "duration"; curve = "linear";
		}
	}
)

Note that removing the opacity reset match = "fullscreen" rule stops the unredir from happening at all, but I'm assuming this is intended?

Also just discovered now, that this only happens when something like Dunst or Rofi is currently on screen, but rofi -normal-window fixes it, so it seems like windows with override redirect cause unredir to turn off/the animations to play? This might be intended behavior?

@yshui
Copy link
Owner

yshui commented Aug 29, 2024

what do i need to do to trigger unredir with this config?

@0neGal
Copy link

0neGal commented Aug 29, 2024

Open a window that has override redirect, i.e Rofi without -normal-window or Dunst, so rofi -show drun should do it

@yshui
Copy link
Owner

yshui commented Aug 29, 2024

Do i have to have no other windows open? running rofi doesn't unredirect.

@0neGal
Copy link

0neGal commented Aug 29, 2024

Oh my bad, read it incorrectly, to unredir you just need a window with _NET_WM_BYPASS_COMPOSITOR = 1 that's fullscreened, notably any Electron app sets this

The Rofi part is what causes the unredir to momentarily disable itself...

@yshui
Copy link
Owner

yshui commented Aug 29, 2024

what i am seeing is that as long as rofi is open, unredir is disabled, which is expected. i don't see the momentary disablement.

could be WM related?

@0neGal
Copy link

0neGal commented Aug 29, 2024

I think the momentary part might just be my setup where an unredir app launches very momentarily, I do feel like I recall it happening on regular windows, but I can't personally reproduce that right now. I'll report back if I find a reproducible situation where that happens again...

Is there a way to prevent override redirects from disabling unredir however? That's really my issue, currently whenever I get a notification unredir disables, which can cause some stuttering when enabling and disabling, especially under a load.

@yshui
Copy link
Owner

yshui commented Aug 29, 2024

@0neGal try { match = "override_redirect || wmwin"; unredir = "preferred"; } ?

@0neGal
Copy link

0neGal commented Aug 29, 2024

Doesn't seem to have any effect, and the rule does match and apply when checking with picom-inspect

@yshui
Copy link
Owner

yshui commented Aug 29, 2024

@0neGal where did you put it in your config file?

@0neGal
Copy link

0neGal commented Aug 29, 2024

As the last rule at first, but I also tried a before the match = "_NET_WM_BYPASS_COMPOSITOR = 1" rule and then before match = "fullscreen" rule, neither worked.

@yshui
Copy link
Owner

yshui commented Aug 29, 2024

looks like there is a bug with setting the unredir option.

@yshui
Copy link
Owner

yshui commented Aug 29, 2024

missed a == 0 here 🤦

strcmp(sval, "default") == 0 || strcmp(sval, "when-possible-else-terminate")) {

@yshui
Copy link
Owner

yshui commented Aug 29, 2024

fixed in next, should work now @0neGal

@0neGal
Copy link

0neGal commented Aug 29, 2024

fixed in next, should work now @0neGal

Just compiled a patched build myself before this, and can confirm, works as intended now!

@raven2cz
Copy link

@raven2cz You can do so via window rules. Assuming you already know how to assign properties to the required windows, you can add a similar rule such as:

rules = (
  {
    match = "MANUAL@ != 1";
    animations = ( { triggers = [ "geometry" ]; preset = "geometry-change"; }, );
  },
),

I have just written this out in this text box, so there may be a few syntax errors, but this general idea will work

@kingdomkind I applied your suggested settings in Picom. The MANUAL has been configured correctly in Awesome, but all client windows appear fully black and are not being rendered by Picom. This seems to be causing significant rendering issues.

@yshui
Copy link
Owner

yshui commented Aug 31, 2024

@raven2cz the rule you added shouldn't change rendering when the animation is not triggered though.

@kingdomkind
Copy link

@raven2cz You can do so via window rules. Assuming you already know how to assign properties to the required windows, you can add a similar rule such as:

rules = (
  {
    match = "MANUAL@ != 1";
    animations = ( { triggers = [ "geometry" ]; preset = "geometry-change"; }, );
  },
),

I have just written this out in this text box, so there may be a few syntax errors, but this general idea will work

@kingdomkind I applied your suggested settings in Picom. The MANUAL has been configured correctly in Awesome, but all client windows appear fully black and are not being rendered by Picom. This seems to be causing significant rendering issues.

This worked fine for me, using my own window manager (assuming the syntax is fine)

@raven2cz
Copy link

raven2cz commented Sep 2, 2024

@raven2cz You can do so via window rules. Assuming you already know how to assign properties to the required windows, you can add a similar rule such as:

rules = (
  {
    match = "MANUAL@ != 1";
    animations = ( { triggers = [ "geometry" ]; preset = "geometry-change"; }, );
  },
),

I have just written this out in this text box, so there may be a few syntax errors, but this general idea will work

@kingdomkind I applied your suggested settings in Picom. The MANUAL has been configured correctly in Awesome, but all client windows appear fully black and are not being rendered by Picom. This seems to be causing significant rendering issues.

This worked fine for me, using my own window manager (assuming the syntax is fine)

@kingdomkind Thanks for the info, could you share a link or file with your configuration? I'll try your setup or compare the changes. After all, my picom.conf has accumulated a lot over the years. Syntax is same.

@kingdomkind
Copy link

@raven2cz You can do so via window rules. Assuming you already know how to assign properties to the required windows, you can add a similar rule such as:

rules = (
  {
    match = "MANUAL@ != 1";
    animations = ( { triggers = [ "geometry" ]; preset = "geometry-change"; }, );
  },
),

I have just written this out in this text box, so there may be a few syntax errors, but this general idea will work

@kingdomkind I applied your suggested settings in Picom. The MANUAL has been configured correctly in Awesome, but all client windows appear fully black and are not being rendered by Picom. This seems to be causing significant rendering issues.

This worked fine for me, using my own window manager (assuming the syntax is fine)

@kingdomkind Thanks for the info, could you share a link or file with your configuration? I'll try your setup or compare the changes. After all, my picom.conf has accumulated a lot over the years. Syntax is same.

https://github.com/kingdomkind/pika-archconfig/blob/5414fc26590bad61d3f7f5b437e1a91d0b50c6fb/picom.conf
It's commented out at the bottom, but is the same as my original post

@raven2cz
Copy link

raven2cz commented Sep 2, 2024

@raven2cz You can do so via window rules. Assuming you already know how to assign properties to the required windows, you can add a similar rule such as:

rules = (
  {
    match = "MANUAL@ != 1";
    animations = ( { triggers = [ "geometry" ]; preset = "geometry-change"; }, );
  },
),

I have just written this out in this text box, so there may be a few syntax errors, but this general idea will work

@kingdomkind I applied your suggested settings in Picom. The MANUAL has been configured correctly in Awesome, but all client windows appear fully black and are not being rendered by Picom. This seems to be causing significant rendering issues.

This worked fine for me, using my own window manager (assuming the syntax is fine)

@kingdomkind Thanks for the info, could you share a link or file with your configuration? I'll try your setup or compare the changes. After all, my picom.conf has accumulated a lot over the years. Syntax is same.

https://github.com/kingdomkind/pika-archconfig/blob/5414fc26590bad61d3f7f5b437e1a91d0b50c6fb/picom.conf It's commented out at the bottom, but is the same as my original post

@kingdomkind Interesting your configuration works! I'll try to set it all up with it. Thank you very much. This original configuration of mine causes the windows inside not to render at all if I uncomment the animations and rules at the bottom:
https://github.com/raven2cz/dotfiles/blob/main/.config/picom/picom.conf

But that's just for your information. I'll then try to make some compromise between the settings. Thanks!

@yshui
Copy link
Owner

yshui commented Sep 2, 2024

@raven2cz i figured out what's wrong, should be fixed now.

@g-wizzy
Copy link

g-wizzy commented Sep 7, 2024

Not sure if it is intended, but I find the following effect a little jarring:

During the slide-in animation, the rounded corners are ignored until the animation is finished. What I mean is, in this example, as the window slides down, the upper corners aren't rounded. I increased the duration in order to make it more apparent.

picom-anim.mp4

Is it meant to look this way ? Or am I missing a parameter to have the corners always be rounded ?

@yshui
Copy link
Owner

yshui commented Sep 7, 2024

@g-wizzy but the rounded corner is still there? or do you mean the corners at the top?

corners are still rounded, but the top half of the window is cropped out so you don't see the top corners.

@g-wizzy
Copy link

g-wizzy commented Sep 7, 2024

@yshui The fact that the corners are cropped during the animation is what I am talking about yes. During the slide-in, the corners at the top are squared, and I was asking if this was intentional.

@yshui
Copy link
Owner

yshui commented Sep 7, 2024

yeah, slide-in crops the window.

@PassiveLemon
Copy link

is there currently a way to disable animations for a window rule?

@absolutelynothelix
Copy link
Collaborator Author

@PassiveLemon, yes, using the rules option. see the man page for details.

@PassiveLemon
Copy link

PassiveLemon commented Sep 12, 2024

@PassiveLemon, yes, using the rules option. see the man page for details.

All I see is how to define animations for specific window types, there's no obvious way to disable them.

Well I effectively disabled them by setting these for the match.

animations = ({
  triggers = [ "open", "show", "close", "hide", "geometry" ];
  suppressions = [ "open", "show", "close", "hide", "geometry" ];
})

Definitely not a solution I like though. Maybe just a simple animations = false?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Not a bug feature Feature request help wanted SOMEBODY PLEASE HELP
Projects
None yet
Development

No branches or pull requests