With a lot of help from NiLuJe we finally got this working. I'm going to document it here in case anyone else is interested.
Method A: Miniclock's foreground/background colours automatically match those currently being used by the rest of the screen.
- In the NightMode config file (.kobo/nightmode.ini) you must enable the retainStateOverRestart option in the [state] section
Code:
[state]
retainStateOverRestart = yes # yes / no
This is necessary so that the Miniclock hack will be able to tell whether your Kobo is currently displaying white-on-black or black-on-white.
- In the Miniclock config file (.addons/Miniclock/miniclock.cfg) leave the foreground/background colours at default
Code:
fg_color=BLACK
bg_color=WHITE
- Using the code below, customise the file usr/local/miniClock/miniclock.sh and replace it in KoboRoot.tgz
Manually change the default code
to this
- Reinstall the Miniclock hack using the newly customised KoboRoot.tgz. I think this will automatically cause a full reboot, which is necessary for the NightMode hack to detect the change made in step 1.
I also offer this as a slight variation ...
Method B: Miniclock will always display its time/date text in a more muted mid-grey. Its background will automatically match that currently being used by the rest of the screen.
- Same as Method A
- Same as Method A, but choose one of the mid-greys for foreground color, e.g.
- Same as Method A, but use this as the replacement code instead
- Same as Method A
And finally ... I think Methods A and B could probably be combined to auto-detect what the user wanted based on the config's fg_color setting. However, as my shell scripting skills are practically non-existent, I'll leave that for someone else to consider.