06-11-2015, 06:29 AM | #76 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Since things in /var/local/* can be cleared when user fat-fingers "Reset to defaults" (at least I think that is correct, its way early in the morning as I write this) - - -
Shouldn't the upstart script in /etc/init have strict presence checking for things in /var/local ? (Unless "Reset to defaults" also re-initializes /etc/init/* - I don't know if it does or does not.) |
06-11-2015, 11:06 AM | #77 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
Awesome work!
|
Advert | |
|
06-16-2015, 01:41 PM | #78 |
Enthusiast
Posts: 46
Karma: 97694
Join Date: Feb 2012
Device: kindle touch
|
Hello!
Thanks eureka for your great work, that's exactly what I wanted! I have a kindle Touch running FW 5.1.2 (as this is the last one that supports enabling TTS via JBPatch for all books) But with this firmware the Current is displayed over the battery symbol (that somehow misses the white border??) I attached an example I tried to play around with _batteryCurrentEl.style.paddingRight = "3pt"; in battery_current_indicator.sh that shifted the text somewhere, but not where I wanted it to be.. How can I move it to the left (or chage the colour to some sort of grey)? |
06-22-2015, 06:42 AM | #79 |
Enthusiast
Posts: 46
Karma: 97694
Join Date: Feb 2012
Device: kindle touch
|
hasn't anyone an idea how to fix this?
|
06-22-2015, 08:04 PM | #80 |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
You're on the right track, just keep experimenting with _batteryCurrentEl.style properties. Google for css reference and javascript style object and try to add/use various combinations of properties and theirs' values. Also reference to files in /usr/share/webkit-1.0/pillow for original HTML and CSS defining status bar view. It will take time, but (generally speaking) that's how I did it
|
Advert | |
|
08-13-2015, 02:51 PM | #81 | |
Connoisseur
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
|
FW 5.6.5 error
Quote:
cat: can't open '/sys/devices/platform/mxc_epdc_fb/graphics/fb0/modes': No such file or directory and I couldn't find the "mxc_epdc_fb" directory when I looked in /sys/devices/platform/. I did find a "imx_epdc_fb" directory with the same structure. Would someone please verify that the imx directory can be used instead of the mxc directory? I really miss my % battery indicator. Thanks. Last edited by ssholloway; 08-13-2015 at 03:02 PM. |
|
08-13-2015, 03:46 PM | #82 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
What are the contents of that file?
... All it is doing is checking to see what size should be applied to "_batteryMeterEl.style.marginTop" Play with the red bit until it looks nice: Code:
#!/bin/sh SCRIPT="" SCRIPT=`cat << 'JAVASCRIPT' | tr -d '\n' | sed -e 's,",\\\\",g' (function () { var _batteryMeterId = BatteryState.batteryFillDiv, _batteryMeterEl = _batteryMeterId && document.getElementById(_batteryMeterId), _currentBatteryLevel = nativeBridge.getIntLipcProperty("com.lab126.powerd", "battLevel"), _originalResolveLabel = BatteryState.resolveLabel; if (!_batteryMeterEl || !_originalResolveLabel) { return; } /* Text should be WHITE to be visible. */ _batteryMeterEl.style.color = "white"; /* Hack style to set vertical alignment of text. */ _batteryMeterEl.style.lineHeight = "5.2pt"; /* Add style for smaller font size. */ _batteryMeterEl.style.fontSize = "7.2pt"; /* Background color for hiding the battery */ _batteryMeterEl.style.backgroundColor="black"; _batteryMeterEl.style.marginTop="-1.6pt"; _batteryMeterEl.style.marginLeft="-2pt"; _batteryMeterEl.style.width="20pt"; _batteryMeterEl.style.minWidth="20pt"; _batteryMeterEl.style.height="12pt"; _batteryMeterEl.style.paddingTop="0.8pt"; if (_currentBatteryLevel) { _batteryMeterEl.textContent = _currentBatteryLevel + "%"; } BatteryState.resolveLabel = function () { var batteryMeterId = BatteryState.batteryFillDiv, batteryMeterEl = batteryMeterId && document.getElementById(batteryMeterId); _originalResolveLabel(); if (batteryMeterEl) { batteryMeterEl.textContent = BatteryState.percent + "%"; } }; })(); ` MESSAGE='{ "pillowId": "default_status_bar", "function": "'${SCRIPT}'" }' lipc-set-prop -s com.lab126.pillow interrogatePillow "$MESSAGE" Last edited by eschwartz; 08-13-2015 at 03:49 PM. |
08-13-2015, 05:28 PM | #83 |
Connoisseur
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
|
|
08-14-2015, 01:10 AM | #84 |
Connoisseur
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
|
OK, this is weird. I replaced the old batterylevel.sh file in extensions on the PW2 with the code eschwartz provided. Opened KUAL, selected "Show battery %" and nothing happens except the text "bin/batterylevel.sh" appears at the bottom of the screen. I don't get any kind of error message in the KUAL log.
I can't figure out what I'm doing wrong. If someone running 5.6.5 would try eschwartz's code, I'd appreciate any feedback you might have. |
08-14-2015, 01:39 AM | #85 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
That "function () ... " statement looks a bit odd to me.
There may be a few missing lines in the posted code. You might be able to spot what is the problem by comparing it with the old script file. |
08-14-2015, 02:12 AM | #86 | |
Connoisseur
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
|
Quote:
I'm beginning to think the coding for the status bar view has changed. I've never played with "pillow" before but I'll look at the HTML and CSS that defines the status bar as mentioned in post 80 right above my first one. |
|
08-14-2015, 02:22 AM | #87 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
knc1 -- Pure copy-paste. Although I stripped out the platform test and the duplicated SCRIPT (I would've tried to use sed to replace the size based on a variable from the platform test).
Is it the missing EOF in the heredoc? Made me wonder too -- but apparently the Kindle consumes it just fine. Last edited by eschwartz; 08-14-2015 at 02:24 AM. |
08-14-2015, 09:45 AM | #88 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Yes, nice catch.
I didn't spot the missing: Code:
JAVASCRIPT Last edited by knc1; 08-14-2015 at 09:47 AM. |
08-16-2015, 09:25 PM | #89 |
Connoisseur
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
|
OK. It's been a l-o-n-g time since I did any programming. I assume JAVASCRIPT (acting as an EOF) should be inserted after the })() and before the ` that is on the next line, correct? Let me know where it should go and I'll try it out. The code worked without the EOF under fw 5.4.2 but things may be more picky under fw 5.6.5. Thanks. |
08-16-2015, 10:18 PM | #90 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Correct.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
support for IBM/360/370/S-390 code on the Kindles (KUAL) | knc1 | Kindle Developer's Corner | 63 | 01-08-2014 07:02 PM |
Bible app for e-ink Kindles (Kindle Active Content) | draytonbenner | Self-Promotions by Authors and Publishers | 0 | 10-18-2012 11:23 AM |
iPad Amazon’s Kindle iOS app now ready for the new iPad’s Retina*Display | monkeyluis | Apple Devices | 9 | 03-18-2012 09:27 PM |
A tray app for Calibre ? | thomass | Calibre | 3 | 08-21-2011 06:19 PM |
So is the Iliad really production ready and is the market ready for e-readers? | pdam | iRex | 28 | 09-14-2006 06:24 PM |