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

feat: fade in and fade out animations #164

Draft
wants to merge 41 commits into
base: master
Choose a base branch
from
Draft

Conversation

WillPower3309
Copy link
Owner

@WillPower3309 WillPower3309 commented May 23, 2023

Closes #7

TODO:

  • Fade in animations
  • Fade out animations
  • Config options
  • Ensure tabbed / stacked containers don't flash, ensure scratchpad open / close is animated
  • Work well w blur and shadow
  • Do this the optimal way with the event loop
  • Bug fixes

@WillPower3309 WillPower3309 marked this pull request as draft May 23, 2023 04:30
@WillPower3309
Copy link
Owner Author

PXL_20230523_040736809.TS.mp4

Quick preview of functionality (I know, ironic that I haven't gotten obs working yet)

@WillPower3309
Copy link
Owner Author

Reference Hyprland initial animation commit: hyprwm/Hyprland@bcf7ee6

@WillPower3309
Copy link
Owner Author

Fade out currently blocks closing multiple windows until the previous window is closed. Will be fixed

@WillPower3309
Copy link
Owner Author

Current progress:
https://github.com/WillPower3309/swayfx/assets/13266308/5aa29574-35d0-4036-93e9-8bb2eef14764

@llem00n
Copy link

llem00n commented Nov 14, 2023

did you abandon it?

@WillPower3309
Copy link
Owner Author

did you abandon it?

Nope, I just got pulled away for some other needed work. I need to re attempt the fade-out

@AnotherRandomGitHubAccount

I tested this branch a while ago, it worked pretty well... (except for weird bugs that made windows invisible). but i think another nice feature would be to make it so that you could have fading move animations. like say you have a window open. you open another, and it fades in. but instead of the previous window snapping into its new size, it would fade out the original one while simultaneously fading in the new-sized window. and maybe you could add some kind of functionality to layershell effects. e.g if mako (or any other notification daemon) redraws (or idk what its called, changes the pixels), it would fade from the previous state to the new one. in Hyprland, a notification in mako would cause mako to fade in. but when theres more than 1 notification, its just sudden. so if theres a way to do this not just with windows but redrawing certain layershell windows, i think that it could give swayfx even a bit of an edge over hyprland. although there aren't really moving animations yet, swayfx is able to give layers shadows. this could be another thing that Hyprland doesn't seem to be addressing.

@WillPower3309
Copy link
Owner Author

I tested this branch a while ago, it worked pretty well... (except for weird bugs that made windows invisible). but i think another nice feature would be to make it so that you could have fading move animations. like say you have a window open. you open another, and it fades in. but instead of the previous window snapping into its new size, it would fade out the original one while simultaneously fading in the new-sized window. and maybe you could add some kind of functionality to layershell effects. e.g if mako (or any other notification daemon) redraws (or idk what its called, changes the pixels), it would fade from the previous state to the new one. in Hyprland, a notification in mako would cause mako to fade in. but when theres more than 1 notification, its just sudden. so if theres a way to do this not just with windows but redrawing certain layershell windows, i think that it could give swayfx even a bit of an edge over hyprland. although there aren't really moving animations yet, swayfx is able to give layers shadows. this could be another thing that Hyprland doesn't seem to be addressing.

Definitely agree with what you're saying here, the movement will be easy to add once fade is in. The reason this isn't merged yet is because I'm looking into fade out issues, may need to rethink how its done with a copy of the surfaces texture

@llem00n
Copy link

llem00n commented Nov 18, 2023

doesn't this mako thing rely on client?

@adityavishwakarma69
Copy link

Nice Work

@WillPower3309
Copy link
Owner Author

WillPower3309 commented Feb 8, 2024

Nice Work

Here's an example of how it is currently:
https://cdn.discordapp.com/attachments/1045402900370837567/1202881816680468562/2024-02-02_02-41-12.mp4

@WillPower3309
Copy link
Owner Author

Gonna need some time to fix some bugs prior to a merge

@augustebaum
Copy link

Looking forward to this! Thanks for the hard work!

@MubinMuhammad
Copy link
Contributor

MubinMuhammad commented Sep 1, 2024

Me too!

@Xyno-dev
Copy link

Xyno-dev commented Sep 2, 2024

I'll ditch Hyprland for SwayFX once and for all once this gets released!

@coolerguy71
Copy link

He puts the W in Will

@WillPower3309
Copy link
Owner Author

Going to refocus on this once we switch to using the scene api, aka next upstream rebase. Scene should simplify this, and Erik has a POC already

@lokesh-krishna
Copy link

Sway 1.10 with the scene-graph API is out! :D

@WillPower3309
Copy link
Owner Author

Sway 1.10 with the scene-graph API is out! :D

We'll get a rebase + release up soon and then focus on this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add fade in / out animations
9 participants