Stylus: Scheduling / night mode

Created on 19 Mar 2017  Â·  8Comments  Â·  Source: openstyles/stylus

As already suggested ages ago by someone (https://github.com/stylish-userstyles/stylish/issues/242), I would love to have a night mode option, which automatically turns websites dark at specific hours.

It could work by selecting specific styles, which one wants to have automatically activated at a configurable time frame.

Since I mainly use Stylus for that reason (apart from a few very good light themes) this feature would be perfect! :blush:

enhancement

Most helpful comment

All 8 comments

I like the option of supporting this. We could open up users to defining time period where certain themes are active. I think that's the most valid way to go about this.

This is a good idea. Maybe take a cue to two from the add-on below.

At the moment the best instant one size fits all add-on is 'Care your Eyes'

The night mode works well when your just visiting some random site.

We could open up users to defining time period where certain themes are active.

To me, to support this we need two new permissions, "idle" and "alarms". The second one can be skipped by using window.setTimeout perhaps, still the first one is mandatory to handle machine's idle state changes to reset timers and apply new states. I can work on this but since manage.html is the target, I guess there will be major conflicts with @tophf work on https://github.com/schomery/stylish-chrome/pull/50.

I guess there will be major conflicts with @tophf work on #50.

Actually, major conflicts will be almost everywhere until we handle that PR.

guys I am working on this scheduling thing on https://github.com/schomery/stylish-chrome/tree/scheduler

Please give it a try and let me know if it works fine or not.

@schomery, it'd be more convenient to discuss it if you open a PR.

You may want to test this branch: https://github.com/openstyles/stylus/pull/736

Was this page helpful?
0 / 5 - 0 ratings