On macOS, I have a Config file for a PDF viewer application, Sioyek that lets me change the background and text colours through a custom configuration combination. However, the app only allows one configuration and I would like to replace the default settings with separate configurations during the day and night. As an example, I have the day configuration as:

Day Configuration

custom_background_color    0.92 0.89 0.83
custom_text_color    0 0 0

and the Night configuration:

custom_background_color    0.180 0.204 0.251
custom_text_color    0.847 0.871 0.914

These are stored in the app's Config file and I wish to come up with a rule that changes the file contents based on the time of the day like:

09:00 - 17:59 prefs.config <- config_day

18:00 - 08:59 prefs.config <- config_night

By the above rule, is there a way to set the contents of the Config file?


  • Use an if to choose which to select, based on he current time.
    – Solar Mike
    May 30 at 19:37
  • Set up two cron jobs, or two LaunchAgents, to copy the correct file into place at 09:00 and 18:00.
    – nohillside
    May 30 at 21:38


You must log in to answer this question.

Browse other questions tagged .