hyprshade
hyprshade copied to clipboard
Add the gradual_shift_duration option to shaders while blocking execution
Same feature as https://github.com/loqusion/hyprshade/pull/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.
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?
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.