anishathalye / lumen

Magic auto brightness based on screen contents 💡

Home Page:https://anishathalye.com/lumen/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

different transition time based on user action

andreineculau opened this issue · comments

on the line of #11 but still a different issue, I am getting headaches watching videos, or just scrolling web pages. When I switch between the browser (white pages) and my terminal (black background), I expect the brightness transition, but when I just scroll, or even don't do anything (video playing), I expect the transition to happen over a longer period of time, if any actually.

My suggestion would be to detect clicks (only main/left button) and keypresses (ignore dead keys) and only then treat the transitioning as normal. Otherwise, treat the transitioning as slowed down.

Yeah, that's a good idea. It probably makes the most sense to just stop the transitioning when you're watching videos, etc.

Not sure what's the best way to detect that, though.

As a intermediate solution, I'd be fine with just detecting if the focused (active application) changes. If it doesn't, then don't touch the brightness.

Or you could just increase the transition time to 2-5 seconds so that it is a little more seamless.