# One-touch light-toggle and shutdown functionality for koreader
#
#
# I've made this little interface mod because it improves my personal
# user experience for koreader on my Kobo H2O.
#
# Maybe someone else out there will also find it convenient.
#


# 02192016.
# 
# This is based on the latest koreader nightly as of right
# now: koreader-kobo-arm-linux-gnueabihf-v2015.11-106-gd9b55af 

 

It's basically two additional icons and attached functions in the reader menu. 

The first one allows for one-touch light-toggling. I find that useful
since the H2O doesn't have a light button. And my elbows also prefer
touchscreen action over pressing hardware buttons.

The other one is for one-touch shutdown. That may be convenient for
people experiencing battery drain in sleep mode.

This works well for me on an H20. There is enough space for these
additional icons in the front menu. Might get a bit crammed on smaller
devices, you'll have to find that out for yourself. I've regularly
used one additional menu item on a Glo before, and thought that was
fine.

For shutdown we use KSM's poweroff script, so KSM is required for this
to work. (You could uncomment the code line to just use the system
poweroff instead. This should work, but doesn't give you a nice suspend
screen at this point.)

----

#NEW Aug 30 2015: (unreleased)
I've included three different versions of readermenu.lua. One for
an additional lighttoggle icon, one for an additional shutdown
icon, and one for both. Using both looks fine on my H20, but on a
device with a smaller screen you might want to choose only one
additional icon.  


#NEW Feb 19 2016:
Updated shutdown version for KSM8.
release of separate versions for only shutdown button / only
lighttoggle button

----

#INSTALLATION:

The two .png files go into koreader/resources/icons/

readermenu.lua replaces the file with that name in
koreader/frontend/apps/reader/modules/

Depending on which version you want to use, copy
readermenu-lighttoggle.lua, readermenu-shutdown.lua or
readermenu-both.lua into
koreader/frontend/apps/reader/modules/readermenu.lua


(For switching back to the original, readermenu-orig.lua is included.)


----

Thanks to tshering for KSM and to embryo for the icons.

Cheers, xor_
