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

Add the gradual_shift_duration option to shaders while blocking execution #30

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

guillaumeboehm
Copy link

Same feature as #29, different implementation.

This PR adds the gradual_shift_duration option to shaders in hyprshade.toml.

With the option set, hyprshade on will block execution for the time set in gradual_shift_duration and gradually set the shader while increasing the gradualPercentage glsl variable.

If the concerned shader is not a template or does not implement the gradualPercentage variable, gradual_shift_duration will have no effect.

@guillaumeboehm
Copy link
Author

With the recent changes I ended up using the [shaders.config] for the shader to fetch the gradual_shift_duration. But it feels somewhat hacky I think, because it's not a variable that is directly passed to the shader... But I suppose you didn't want the shader to have the whole config for no reason?

@guillaumeboehm
Copy link
Author

Implemented it with an normal config and not a shader variable, it does feel hacky though... Not having the full config in the shader ends up making it a bit annoying.

@guillaumeboehm guillaumeboehm force-pushed the feature-gradual-shift-blocking branch 4 times, most recently from fcc9177 to 316a378 Compare April 23, 2024 07:23
@guillaumeboehm guillaumeboehm force-pushed the feature-gradual-shift-blocking branch from 316a378 to e5a4a1d Compare May 1, 2024 09:24
This commit adds the `gradual_shift_duration` option to shaders in
hyprshade.toml. Any shader with a `start_time` can have this option.

With the option set, `hyprshade on` will block execution for the time
set in `gradual_shift_duration` and gradually set the shader while
increasing the `gradualPercentage` glsl variable.

If the concerned shader is not a template or does not implement the
`gradualPercentage` variable, `gradual_shift_duration` will have no
effect.

The `blue-light-filter` shader is now a mustache template and the `gradualPercentage` variable is implemented for it.

The option was also added to the `test_config`
@guillaumeboehm guillaumeboehm force-pushed the feature-gradual-shift-blocking branch from e5a4a1d to 964d57f Compare July 2, 2024 17:53
@NullVoxPopuli
Copy link

excited for 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.

2 participants