Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kindle PW Touch compatibility #22

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/dash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ init() {

echo "Starting dashboard with $REFRESH_SCHEDULE refresh..."

/etc/init.d/framework stop
if [ -f /etc/init.d/framework ]; then
/etc/init.d/framework stop
else
/etc/init/framework stop
fi
initctl stop webreader >/dev/null 2>&1
echo powersave >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
lipc-set-prop com.lab126.powerd preventScreenSaver 1
Expand Down
10 changes: 9 additions & 1 deletion src/local/fetch-dashboard.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/usr/bin/env sh

# Url of content to download
CONTENT="https://raw.githubusercontent.com/pascalw/kindle-dash/master/example/example.png"

# Fetch a new dashboard image, make sure to output it to "$1".
# For example:
"$(dirname "$0")/../xh" -d -q -o "$1" get https://raw.githubusercontent.com/pascalw/kindle-dash/master/example/example.png
"$(dirname "$0")/../xh" -d -q -o "$1" get $CONTENT
# xh seems not to be able to load certificates on Kindle PW Touch: fall back to curl in case of error
if [ $? != 0 ]; then
curl -o "$1" "$CONTENT"
fi