View Single Post
Old 10-30-2018, 12:10 PM   #105
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by NiLuJe View Post
@jackie_w: In this case, after taking a look at the nightmode hack, I'd say something like...

Code:
if grep -q "state:invertActive = yes" "/mnt/onboard/.kobo/nightmode.ini" ; then
    fbink -h ....
else
    fbink ....
fi
Thanks for looking I tried, but no joy. No matter how many times I toggled NightMode on/off the miniclock was always displayed black-on-white.
miniclock.cfg file has default settings
Code:
fg_color=BLACK
bg_color=WHITE
Part of the problem may be that I don't think the nightmode.ini file's [state]invertActive parameter is dynamically updated as the device toggles in/out of NightMode. The timestamp on the .ini file remains unchanged. I don't know how/where the actual current state is stored.

But I don't think this can be the whole problem. Even if I manually set the .ini to invertActive = yes, before rebooting, I still always get black-on-white. It doesn't look like the -h parameter is doing anything.

However, in case my practically non-existent shell scripting skills are at fault, I changed miniclock.sh from
Spoiler:
Code:
update() {
    sleep 0.1
    fbink -X "$cfg_offset_x" -Y "$cfg_offset_y" -F "$cfg_font" -S "$cfg_size" \
          -C "$cfg_fg_color" -B "$cfg_bg_color" \
          "$(date +"$cfg_format")"
}

to

Spoiler:
Code:
update() {
    sleep 0.1
    if grep -q "state:invertActive = yes" "/mnt/onboard/.kobo/nightmode.ini" ; then
        fbink -h -X "$cfg_offset_x" -Y "$cfg_offset_y" -F "$cfg_font" -S "$cfg_size" \
          -C "$cfg_fg_color" -B "$cfg_bg_color" \
          "$(date +"$cfg_format")"
    else
        fbink -X "$cfg_offset_x" -Y "$cfg_offset_y" -F "$cfg_font" -S "$cfg_size" \
          -C "$cfg_fg_color" -B "$cfg_bg_color" \
          "$(date +"$cfg_format")"
    fi
}


and I made the changes to frostschutz's Miniclock update dated today.

I suspect I'm outstaying my welcome on this annoying little issue, but if you do get any more bright ideas I'll be happy to test them out ... as long as it can be done with a simple Windows PC
jackie_w is offline   Reply With Quote