Tyrrrz / LightBulb

Reduces eye strain by adjusting screen gamma based on the current time
MIT License
2.23k stars 141 forks source link

Toggle shortcut doesn't respect transition duration #290

Closed LilithSilver closed 4 months ago

LilithSilver commented 4 months ago

Version

v2.4.12

Platform

Windows 10

Steps to reproduce

  1. Ensure filter is active and at a low-temperature value
  2. Add a keyboard shortcut to "Toggle LightBulb"
  3. Set "Transition Duration" to 1s
  4. Press the shortcut

Details

Expected behavior: The transition takes the amount of time specified.

Actual behavior: The transition duration is not respected; it takes about 5 seconds.

Checklist

LilithSilver commented 4 months ago

Note that I've fixed this for myself on #291. It allows a maximum duration (which also improves slider behavior) but not total customization of the duration, due to technical limitations. If you're not interested in putting that code into master, feel free to close the PR, but I thought I'd put my solution up. (Also of course feel free to suggest edits.)

Tyrrrz commented 4 months ago

I guess there's confusion here, as "transition duration" controls the time it takes to complete the transition at sunrise/sunset. What you're referring to is called "configuration smoothing" in settings and that duration cannot be controlled. I'll take a look at the PR in a bit.

LilithSilver commented 4 months ago

Yeah, you're right - regardless, my ultimate goal here is to customize that duration. My specific issue is that I toggle the filter on and off a lot throughout the day, and I'd like the transition to take, say, 0.5s, instead of 10s.

(Of course the other option is instant by turning off the gamma smoothing, but that hurts my eyes!)