nightTab icon indicating copy to clipboard operation
nightTab copied to clipboard

Light/Dark following time of day

Open jdrempel opened this issue 4 years ago • 2 comments

Problem Description I am a light mode user but I often use my computer at night too and try to avoid brightness during that time.

Solution I would love to be able to set a light theme and a dark theme and have nightTab use one or the other depending on the time of day when I load the tab.

jdrempel avatar Sep 04 '20 21:09 jdrempel

If you're on Win10 you can use something like https://github.com/Armin2208/Windows-Auto-Night-Mode to set dark mode depending on time of day, then you can set nightTab to follow system dark mode (Theme > Style > Automatic) and that should do it.

Q-out avatar Sep 07 '20 10:09 Q-out

Thanks for the feedback @jdrempel. The best way to achieve this would be to as @Q-out has suggested and follow the system dark or light mode (using the Automatic Theme Style). And then use a schedule on the system level.

I have experimented with a light and dark mode schedule in the project and the tl:dr findings are:

  • nightTab would need to check the time on load to determine which style to use, dark or light
  • This often results in a flash of light or dark before this check is completed, which is obviously undesirable
  • I've worked very hard to remove that flash of light or dark in the most recent updates and a step back is undesirable.
  • I also tested using the schedule on the system to change the light or dark mode based on time of day and the browser (and nightTab) responded instantly.

I also do not want to handle anything to do with timezones (they are very difficult to get right) and this could be a requirement of such a time of day feature.

zombieFox avatar Sep 08 '20 09:09 zombieFox