meh so I did it to show what I meant.
a learning exercise now if you can be bothered to read...
tl; dr: The extension is below.
It displays at the top.
It just parses the log and shoves up a time when the page is triggered.
I re-factored all the external scripts out and made it a one hit wonder.
PHP Code:
#!/bin/bash
if [ -d /sys/devices/platform/mxc_epdc_fb/graphics/fb0 ]
then
PLATFORM="$(cat /sys/devices/platform/mxc_epdc_fb/graphics/fb0/modes)"
else
PLATFORM=""
fi
echo $PLATFORM
if [ ! -d /sys/devices/platform/mxc_epdc_fb/graphics/fb0 ] then
# it's probably something ancient
if [ ! -e /proc/fiveway_wake ] ; then
echo "k2 or something detected"
# This next part says, "Clear Log" then
# "Push the new log, line by line, into awk" then
# "If a certain line is matched by awk get awk to run eips via the shell"
&> /var/log/messages && 2>/dev/null tail -f /var/log/messages | \
awk '/.*PageAction*./ || /.*acxmgrd*./ || /.*NextPage*./ || /.*Reader*./ {system("eips 20 0 `date +%T`")} '
exit 0
else
echo "k3 or k4 or something detected"
&> /var/log/messages && 2>/dev/null tail -f /var/log/messages | \
awk '/.*PageAction*./ || /.*acxmgrd*./ || /.*NextPage*./ || /.*Reader*./ {system("eips 20 0 `date +%T`")} '
exit 0
fi
fi
if [ -d /sys/devices/platform/mxc_epdc_fb/graphics/fb0 ]
then
if [ "$PLATFORM" != "${PLATFORM/758/}" ]
then
echo "PW detected"
# eips 25 41 `date +%T`" Would be middle bottom offset from amazon readout on a PW, we went with top middle.
&> /var/log/messages && 2>/dev/null tail -F /var/log/messages | exec parselog | \
awk '/.*PageTurnAction*./ || /.*JunoExecutionManager*./ {system("eips 20 0 `date +%T`")} '
exit 0
else
# it's something else, probably older
echo "Generic detected"
&> /var/log/messages && 2>/dev/null tail -F /var/log/messages | exec parselog | \
awk '/.*PageAction*./ || /.*PageTurnAction*./ || /.*acxmgrd*./ {system("eips 20 0 `date +%T`")} '
exit 0
fi
fi
Should work. Probably needs love on some devices with the
showlog -f matches. feedback and testing happily accepted.
Enjoy.
If you want the display in a different place on a certain device just fiddle with the X Y on the eips.
(1st two parameters)
CHANGELOG:
0.1 First release.
0.2 Added: "PageTurnAction" to Kindle Touch matches to handle Amazon revision changes.
0.3 Switched to bash for comparison, added dir test.