Comments (2)
Hey @coder543 I looked into this as well. The downside of writing the battery percentage to the screen like this is that the font will most likely not match the other content on the dashboard. Depending on your backend you might be able to include the percentage in a request header and render it into the dashboard image, something like this:
"$(dirname "$0")/../ht" -d -q -o "$1" get \
https://raw.githubusercontent.com/pascalw/kindle-dash/master/example/example.png \
"X-Kindle-Battery: $(gasgauge-info -c)"
I'm planning to add some more 'tips and tricks' to the README, to document these kinds of us useful things you can do in the local scripts. Both methods (writing the stats locally and the header approach) could be documented there.
from kindle-dash.
Just an idea, but it would probably be nice to be able to see the battery percentage on the kindle dashboard... at which point, I thought "why not have the last update time shown as well?"
I added this to the
refresh_dashboard
function locally:/usr/sbin/eips 1 39 "last update: $(date -Iminutes) battery: $(gasgauge-info -c | sed 's/%//g')"
Unfortunately, the built-in
busybox
date
utility is extremely limited, so this is printing in UTC time (and not in a very nice format to begin with) and I also discovered thateips
can't print the%
symbol, apparently, so I'm usingsed
to strip that out.Obviously a lot of room for improvement, which is why I didn't open a PR, but I figured I'd at least mention the idea.
thank you,
that was exactly what I was looking for the testing and debugging phase!
from kindle-dash.
Related Issues (14)
- How to disable kindle-dash? HOT 3
- Image aspect ratio morphed/incorrect HOT 5
- Add support for non Kindle devices HOT 2
- Render to png HOT 3
- Move next_wakeup_secs to local HOT 2
- When kindle is in RTC sleep it cannot be charged HOT 5
- Question: Battery life? HOT 5
- Failed to download image HOT 26
- Changing low-battery.sh to turn off the kindle and then ensure dash.sh/start.sh runs on boot
- xh segfaults on download HOT 1
- fetch_dashboard.sh to check ETag? HOT 7
- Cron format has an unusual number of columns HOT 5
- wait-for-wifi.sh not working reliably when called from dash.sh HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kindle-dash.