Last active
December 22, 2015 15:08
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lipc-set-prop com.lab126.powerd wakeUp 1 | |
mntroot rw | |
sleep 3 | |
# randomize order of photos | |
for f in /mnt/us/photos/* | |
do | |
newfile=`mktemp -p /mnt/us/photos` | |
mv -f $f $newfile | |
done | |
# if pics are downloaded, then choose between a pic and a photo | |
if [ "$(ls -A /mnt/us/pics)" ] | |
then | |
# 50% probability of displaying pic or photo | |
if [ `sed 's/[^[:digit:]]\+//g' < /dev/urandom | head -n 1 | awk '{print substr($0,0,2);}'` -lt 50 ] | |
then | |
# display a downloaded pic | |
echo displaying a downloaded pic | |
mv -f "/mnt/us/pics/`ls /mnt/us/pics -1 | head -n 1`" /mnt/us/linkss/screensavers/bg_xsmall_ss00.png | |
else | |
# display a photo | |
echo displaying a photo | |
cp "/mnt/us/photos/`ls /mnt/us/photos | sort | head -n 1`" /mnt/us/linkss/screensavers/bg_xsmall_ss00.png | |
fi | |
else | |
# no pics currently, just change to a photo | |
cp "/mnt/us/photos/`ls /mnt/us/photos | sort | head -n 1`" /mnt/us/linkss/screensavers/bg_xsmall_ss00.png | |
fi | |
# show the screensaver | |
/usr/bin/powerd_test -p | |
# suspend the Kindle in "Ready to suspend" mode indefinitely | |
a=0 | |
while [ $a -lt 50 ] | |
do | |
lipc-set-prop com.lab126.powerd deferSuspend 86400 | |
sleep 2 | |
a=`expr $a + 1` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment