night-owl icon indicating copy to clipboard operation
night-owl copied to clipboard

Auto switch based on system theme / preference?

Open apiep opened this issue 3 years ago • 3 comments

Hi nice addons, thanks for making this addons!

I don't know if it possible as I am not familiar with addons development, but is it possible to make this addons follow system preference? Thanks

apiep avatar Feb 02 '21 07:02 apiep

@apiep Thanks for the suggestion. As I know Firefox is not allowing to read system preferences. Also even it could read, I think it should be applied only on first time. Because what I think is, system preference is not always matching with the browser theme. Sometimes people use dark theme on browser while using light theme on OS. Same with opposite. So, what I think is switching between light/dark themes should be easier when it needed and currently it's only one click :)

Hope this response addresses your issue.

dumindu avatar Feb 12 '21 05:02 dumindu

Hi very sorry for the late reply, I have made a fork and a working auto switch of night owl. Should I put a PR for that? Currently this is what is working:

  • Read system preference on launch
  • Auto switch theme when system preference are changed

It is working for both windows 10 & mac os bigsur while I test it, but I plan to add a configuration screen for people who does'nt want an auto switch feature.

apiep avatar Mar 13 '21 10:03 apiep

Hi @apiep , Feel free to create a PR. I've also tested the xpi file you attached and never knew that now Firefox supports system theme even for themes. Nice job!

dumindu avatar Mar 14 '21 07:03 dumindu