[GH-ISSUE #40] 2 configs (day / night, after sunset / sunrise, 'night mode' etc) #38

Open
opened 2026-03-03 11:13:35 +03:00 by kerem · 6 comments
Owner

Originally created by @andiohn on GitHub (Oct 3, 2024).
Original GitHub issue: https://github.com/debloper/xiosk/issues/40

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?

Originally created by @andiohn on GitHub (Oct 3, 2024). Original GitHub issue: https://github.com/debloper/xiosk/issues/40 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?
Author
Owner

@debloper commented on GitHub (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.

<!-- gh-comment-id:2397578394 --> @debloper commented on GitHub (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.
Author
Owner

@andiohn commented on GitHub (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.

<!-- gh-comment-id:2397655064 --> @andiohn commented on GitHub (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.
Author
Owner

@andiohn commented on GitHub (Oct 7, 2024):

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

<!-- gh-comment-id:2397655971 --> @andiohn commented on GitHub (Oct 7, 2024): I'm thinking 'have a good night, see you tomorrow' kind of thing. Or 'we're closed' you know?
Author
Owner

@debloper commented on GitHub (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.

<!-- gh-comment-id:2397668871 --> @debloper commented on GitHub (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.
Author
Owner

@andiohn commented on GitHub (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

<!-- gh-comment-id:2398113028 --> @andiohn commented on GitHub (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
Author
Owner

@debloper commented on GitHub (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.

<!-- gh-comment-id:2399466117 --> @debloper commented on GitHub (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 in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/xiosk#38
No description provided.