loqusion / hyprshade

Hyprland shader configuration tool
MIT License
222 stars 7 forks source link

Add the gradual_shift_duration option to shaders while blocking execution #30

Open guillaumeboehm opened 3 months ago

guillaumeboehm commented 3 months ago

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.

guillaumeboehm commented 2 months ago

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

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.