Quote:
Originally Posted by alispiritato
Hi everyone,
I'm not a developer and I was very delighted when I came across the nightmode hack a year or so ago and was able to successfully add the code to my Kobo Glo. I was quite dismayed when it updated itself to the 4.2++ version and the hack was lost.
But i came across this forum with the new code to try but somehow I'm not getting it to work (using the github/gtalusan etc link). I'm now thinking that with all the changes i've tried to make under the .kobo folder, that i've wrecked it and i can't remember what was even there before i tried these changes.
I tried to copy an image of my .kobo folders but i wasn't able to paste it in here. But this is what is there:
My apologies for the length of this but i now suspect i have things here which don't belong. Would anybody else for whom they've been able to get the nightmode to work tell me what is in there .kobo folder? or what i need to eliminate from mine?
much thanks in advance!
|
I'd suggest re-downloading the KoboRoot.tgz from this link:
NightMode KoboRoot.tgz just to make sure you have a clean copy.
Connect your Glo and copy this file into the .kobo directory. Safely eject your Glo and it should install this version (the updating screen and then a restart). Once your Glo is back to the home page, connect it to your computer and check to see if you have nightmode.ini in the .kobo directory. If it is present, the install should have worked. You can check the nightmode.ini file in the .kobo directory after the install and modify any options that you feel safe modifying. There will also be a nightmode.sh file present. After this, safely eject your Glo and it should let you toggle nightmode with the light switch long press.
I've pasted the default nightmode.ini file contents below just in case your old version was not overwritten though I didn't see it in your file list. The only changes I've needed to make here were for the Kobo Aura One where there is no physical light switch and the brightness settings to toggle nightmode don't work so invertActive needs to be set to yes for it to work which means you need to use your computer to toggle nightmode.
Some of the directories you listed as being in your .kobo directory such as root, etc, mnt and extra are not present on my device. The sqlite files are SQLite databases, the KoboReader.sqlite can be worked on with SQLite tools while the BookReader.sqlite is an encrypted file. The remaining files are text files and can be opened with a text editor -- I recommend Notepad++ for Windows users since it respects Linux style end of lines.
Code:
# config file for kobo-nightmode
[state]
invertActive = no # yes / no
retainStateOverRestart = no # yes / no
[control]
longPressDurationMS = 800 # time in milliseconds to toggle (1000 = 1 second)
debug=no # yes/no to enable/disable debug logging
[nightmode]
refreshScreenPages = 3 #force refresh every X pages
#forceSWInvert = true #force SW invert mode (default: false)
[brightness]
1percentPatch = yes # yes / no : Nickel set brightness to 2% even when on UI it is set to 1%
# this patch will force brightenss to 1% when:
# - it was set to 1%, then it was set to 0% (for instance: stand-by) then changed again to "what Nickel says is 2%"
# - it was set to 3%, then it was set to 1% then changed again to "what Nickel says is 2%"
timeout = 5 # time in seconds, after brightness is set (and maintained) to a given level, to toggle the action set to that level
# switch device off
7 = echo -ne "\xfe\x0f\xc5\x54\xff\x6a\x0d\x00\x01\x00\x74\x00\x01\x00\x00" > /dev/input/event0
# put device in standby
8 = echo -ne "\xf0\x0f\xc5\x54\x3c\xe0\x0d\x00\x01\x00\x74\x00\x01\x00\x00\x00\xf1\x0f\xc5\x54\x8e\xe3\x02\x00\x01\x00\x74\x00\x00\x00\x00\x00" > /dev/input/event0
# when brightness is set to 11% : special action, toggle night toggleNightMode
11 = toggleNightMode
12 = enableNightMode
13 = disableNightMode
#20 = dmesg > /mnt/onboard/.kobo/dmesg_$(date +%s).log &
#30 = mv -f /mnt/onboard/.kobo/screenInv.so /root/screenInv.so >/dev/null 2>&1
#50 = hwclock -w -u
#98 = touch /mnt/onboard/.kobo/switchoff/test0.log &
#99 = /mnt/onboard/.kobo/switchoff/test.sh &
#some examples of invoking any script when brightness is set to X% for at least TIMEOUT seconds
#4 = touch /mnt/onboard/hello.world
#5 = touch /mnt/onboard/hello.world.async &
Good luck!