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

core: introduce animation manager and animation config #631

Merged
merged 15 commits into from
Jan 6, 2025

Conversation

PaideiaDilemma
Copy link
Collaborator

@PaideiaDilemma PaideiaDilemma commented Jan 1, 2025

This PR uses AnimationManager and AnimatedVaraible from hyprutils to implement an animation system.
Simplifies adding and implementing existing animations.

Before adding the animation manager, it made sense to move all the colors to hyprgraphics using the same wrapper (CHyprColor) that hyprland uses.

There is a bit of code that is basically the same as in hyprland:

  • Bezier and Animation config parsing
  • Updating variables
  • CHyprColor

The config for beziers and animations works the same as in Hyprland. This is the animation tree i came up with:

global
  ↳ fade
    ↳ fadeIn - hyprlock fades in
    ↳ fadeOut - hyprlock fades back to your desktop 
  ↳ inputField
    ↳ inputFieldColors - fade between colors (supports outer gradient, previously fail_transition)
    ↳ inputFieldFade - fade_on_empty animation
    ↳ inputFieldWidth - adaptive width animation
    ↳ inputFieldDots - fade in/out for individual dots in the input field (previously dots_fade_time)

BREAKING:

  • Removed input-field:dots_fade_time. Now configured via
    animation=inputFieldDots,...
  • Removed input-field:fail_transition. Now configured via
    animation=inputFieldColors,...
  • Removed general:no_fade_in and general:no_fade_out. Now configured
    globally via animations:enabled or via animation=fadeIn,... and
    animation=fadeOut,...

NEW:

  • Animations can be globally disabled/enabled with animations:enabled

Closes #610
Closes #566
Closes #254

Pretty much copied from hyprland.

BREAKING:
- Removed `input-field:dots_fade_time`. Now configured via
`animation=inputFieldDots,...`
- Removed `input-field:fail_transition`. Now configured via
`animation=inputFieldColors,...`
- Removed `general:no_fade_in` and `general:no_fade_out`. Now configured
globally via `animations:enabled` or via `animation=fadeIn,...` and
`animation=fadeOut,...`
@vaxerski
Copy link
Member

vaxerski commented Jan 1, 2025

do we want to wait until we also land the tree stuff in hyprutils?

@PaideiaDilemma
Copy link
Collaborator Author

do we want to wait until we also land the tree stuff in hyprutils?

However you prefer, I have the code.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate reviewing long MRs

anyways looks alright if it works and doesnt have a backdoor lgtm

most of the code is stolen from hyprland anyways

@PaideiaDilemma
Copy link
Collaborator Author

Understandable.
Yeah lots of stolen Hyprland code in hyprlock 👀

I am running this since yesterday and hope some people from the discord will test it as well.

@PaideiaDilemma
Copy link
Collaborator Author

Works well for me. @alba4k also did not have any problems.
Just bumped the hyprutils version in CMakeLists in the last commits.

@PaideiaDilemma PaideiaDilemma merged commit 00d2cbf into hyprwm:main Jan 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants