Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 configs (day / night, after sunset / sunrise, 'night mode' etc) #40

Open
andiohn opened this issue Oct 3, 2024 · 6 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@andiohn
Copy link

andiohn commented Oct 3, 2024

This would be good to either 'blank' the display with a black screen or to run a different set of URLs that have dark mode?

@debloper
Copy link
Owner

debloper commented Oct 7, 2024

Wouldn't want PiOSK to track/analyze the internals of which websites are being used by the user (which would be necessary to record brightness/darkness to determine the mode).

Maybe set the preferred mode in the desktop manager?

Or, am I misunderstanding the issue? If so, please clarify.

@debloper debloper added the question Further information is requested label Oct 7, 2024
@andiohn
Copy link
Author

andiohn commented Oct 7, 2024

I'm basically thinking of 2 'schedules'. Run these websites between these hours, run these other websites during these other hours. One of the options could be 'dark screen' or 'blank' or 'none, turn off screen' or 'just black'.

Also, I wonder if we could trigger dark / light mode of chromium on a schedule too, that way if the site supports dark mode, it would change by itself.

@andiohn
Copy link
Author

andiohn commented Oct 7, 2024

I'm thinking 'have a good night, see you tomorrow' kind of thing. Or 'we're closed' you know?

@debloper
Copy link
Owner

debloper commented Oct 7, 2024

Understood... some kind of "after hour" schedule, with alternative link(s).

Can't prioritize this, as this is a pretty niche usecase.

But, for the time being, you can:

  • copy config.json into day.json & night.json
  • configure each of the day and night JSON to your liking
  • add a cronjob to copy day.json as config.json at a certain time, and reboot
  • add another cronjob to copy night.json as config.json at another time, and reboot

That should grossly do what you want it to.

Keeping it open for future consideration/implementation.

@debloper debloper added enhancement New feature or request help wanted Extra attention is needed and removed question Further information is requested labels Oct 7, 2024
@andiohn
Copy link
Author

andiohn commented Oct 7, 2024

That's a cool idea, perhaps. Or even a "kill all chromium, and relaunch" thing so it doesn't have to reboot but your idea seems to be easier

@debloper
Copy link
Owner

debloper commented Oct 8, 2024

When the feature gets implemented (if/when it does) it will not require reboot. Just kill Chromium, swap the config file & rerun browser.sh should do it.

If you want to avoid reboot, then you can include that in the cronjob as well. I just find reboot simpler, cause less baggage of something messing with the expected result; but I understand there are times when reboot can't be afforded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants