View Single Post
Old 05-21-2019, 03:02 PM   #630
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by ikkentobi View Post
Hi,

I use KSM 09 on two devices for ages now. When I shut down the device, usually
the file kbmenu_user/txt/poweroff_info.html is displayed, until I turn it on again.

I customized this file somewhat. This is easy enough since it is just some static html.

However, is it also possible to modify this file just before the reader is shut off?
I'd really like to display

- the date and time when I last stopped reading
- the % of the battery

Any idea how this can be achieved? Help is appreciated.
If you want to create or modify kbmenu_user/txt/poweroff_info.html by script, adds/kbmenu/onstart/poweroff.sh would be the appropriate file to add your commands. You could add your commands anywhere above
Code:
pofile=${pofile:-"$ksmuser/txt/poweroff_info.html"}
If you would like to test your commands before you really write it to the above file, try them in adds/kbmenu/scripts/tests/poweroff_test.sh. This script does the same as adds/kbmenu/onstart/poweroff.sh apart from powering off.

Last edited by tshering; 05-21-2019 at 03:04 PM.
tshering is offline   Reply With Quote