WillPower3309 / swayfx

SwayFX: Sway, but with eye candy!
MIT License
1.29k stars 48 forks source link

feat: fade in and fade out animations #164

Open WillPower3309 opened 1 year ago

WillPower3309 commented 1 year ago

Closes #7

TODO:

WillPower3309 commented 1 year ago

https://github.com/WillPower3309/swayfx/assets/13266308/c93145fe-3147-470c-8d63-3b19839d0a04

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

WillPower3309 commented 1 year ago

Reference Hyprland initial animation commit: https://github.com/hyprwm/Hyprland/commit/bcf7ee6dc225c00b2aea9891ea42aeb18e5b0cc8

WillPower3309 commented 1 year ago

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

WillPower3309 commented 1 year ago

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

llem00n commented 9 months ago

did you abandon it?

WillPower3309 commented 9 months ago

did you abandon it?

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

AnotherRandomGitHubAccount commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

doesn't this mako thing rely on client?

WillPower3309 commented 7 months ago

TODO: fix last commit prevented the buffer from rendering

WillPower3309 commented 7 months ago

Main big thing that is left is to have the view unfocus at start of fade out

WillPower3309 commented 7 months ago

cases to test:

adityavishwakarma69 commented 7 months ago

Nice Work

WillPower3309 commented 7 months ago

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 commented 6 months ago

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

augustebaum commented 1 month ago

Looking forward to this! Thanks for the hard work!

MubinMuhammad commented 5 days ago

Me too!

AuraPy commented 4 days ago

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

coolerguy71 commented 21 hours ago

He puts the W in Will