|
|
07/21/2009, 11:28 PM
|
#1 (permalink) |
|
Member
![]() Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
|
Battery Icon and Pecent Description:
This will add a color-coded percent number with the battery icon in the top bar. Charging = Teal. 100%-70% = Green. 69%-45% = Yellow. = 44%-20% = Orange. 19%-0% = Red. ![]() Up in the top right we have the battery icon, is it or would it be possible to tweak the OS to show us a percentage % of battery life instead of the icon? I am somewhat willing to root and tweak the OS in vi and all but do not have the knowledge to see if this could be done. Just wondering if it could! And possibly how! Thanks! ![]() Edit: So nesl247 has a working patch for the % in place of the battery icon with color!!! Go to thread post #98 for the master of all posts! "One post to rule them all!" It is spelled out perfectly and easy for all to see! Pics of this in technicolor can be found here!!! And proof it's running in 1.1.0 More tweaking! So if one is willing to "tweak and hack" a little more in root go to post #325 (wow this thread has taken off!) and you can make it so the percentage is Blue while being charged! Pretty neat tweak (thank the appropriate people) but it does require some serious rooting! Pictures their to prove it also! Last edited by Milominderbinder; 10/12/2009 at 01:18 PM. Reason: Added description and screenshot - hope that is OK |
07/22/2009, 01:50 AM
|
#5 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 71
Likes Received: 0
Thanks: 0
Thanked 35 Times in 8 Posts
|
Working on it, and almost have it done I think. Problem is everytime I need to test it, I have to restart the pre which takes about 3 minutes. Anyone know a way to restart the UI?
|
07/22/2009, 02:21 AM
|
#7 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 71
Likes Received: 0
Thanks: 0
Thanked 35 Times in 8 Posts
|
What's the easiest way to give links to the 2 patches needed (2 files). I can't post links yet because of my post count.
It does work for me (using it on my pre), but it might not be the prettiest. It's the same looking text as the time, and without more space, I can't fit a % sign in there. But the number does display properly. |
07/22/2009, 09:37 AM
|
#9 (permalink) |
|
Member
![]() Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
|
Or you could post it over at the webOS internal Wiki Main Page - WebOS Internals
|
07/22/2009, 01:11 PM
|
#11 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 71
Likes Received: 0
Thanks: 0
Thanked 35 Times in 8 Posts
|
Sorry was at work when I got the email about removing http... Anyway, here's the info:
The following two links contain the patches needed for this to work. pastebin.com/f3497f51d - /usr/lib/luna/system/luna-systemui/stylesheets/systemui.css pastebin.com/f44115c2e - /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js It worked for me, though I didn't test the patch after pastebin'ing it. |
07/22/2009, 01:18 PM
|
#12 (permalink) |
|
Member
![]() Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
|
Sweet, Now I suppose I should be the first one to try since I asked, haha. So while in root just copy/paste each line or do I need to 'cp' the lines? (Sorry for the lack of knowledge)
|
07/22/2009, 01:28 PM
|
#13 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 71
Likes Received: 0
Thanks: 0
Thanked 35 Times in 8 Posts
|
Remount root as rw: rootfs_open -w
Copy and pate the first to /usr/lib/luna/system/luna-systemui/stylesheets/systemui.css.diff and the second to /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js.diff Then: cd /usr/lib/luna/system/luna-systemui/stylesheets patch < systemui.css.diff cd /usr/lib/luna/system/luna-systemui/app/controllers patch < bar-assistant.js.diff Try that and see if it works. It should, but again I'm not 100% sure since I modified the file by hand. |
07/22/2009, 02:57 PM
|
#16 (permalink) |
|
Member
![]() Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
|
Thanks, installed the ipkg-opt update and all now:
Code:
patch unexpectedly ends in middle of line patch: **** Only garbage was found in the patch input. Code:
cp /media/internal/(file name) /usr/lib/luna/system/luna-systemui/stylesheets/systemui.css.diff cp /media/internal/(file name) /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js.diff What am I doing wrong? Is there a file name wrong somewhere? Thanks for your patients! |
07/22/2009, 06:16 PM
|
#18 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 10
Likes Received: 0
Thanks: 3
Thanked 1 Time in 1 Post
|
Well, I can tell you the code seems to work. I edited the files manually and everything looks good so far. It shows the % of charge instead of that battery icon. I'm not sure if I really like how it looks, but its there.
|
07/22/2009, 06:55 PM
|
#20 (permalink) | |
|
Forum Leader
![]() Join Date: Jan 2007
Location: Fort Worth, TX
Posts: 5,771
Likes Received: 5
Thanks: 796
Thanked 1,165 Times in 801 Posts
|
Quote:
Also looking at this code it appears that the low battery alert is here, do you know how to go about nulling it or giving it another class? |
|
![]() |
|
| Tags |
| battery, hack, icon, percentage |
| Thread Tools | |
| Display Modes | |
|
|



