webOS Nation Forums >  Homebrew >  webOS patches > Battery % in place of Icon... Working in 1.1.0 in color
Battery % in place of Icon... Working in 1.1.0 in color

  Reply
 
LinkBack Thread Tools Display Modes
Old 07/21/2009, 11:28 PM   #1 (permalink)
Member
 
Webby_s's Avatar
 
Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
Default Battery % in place of Icon... Working in 1.1.0 in color

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
Webby_s is offline   Reply With Quote
Old 07/21/2009, 11:47 PM   #2 (permalink)
Member
 
Join Date: Jul 2009
Posts: 27
Likes Received: 0
Thanks: 33
Thanked 1 Time in 1 Post
Default

That would be way more useful than the current icon, hopefully Palm changes this for non-rooted Pres!
sjs2626 is offline   Reply With Quote
Old 07/21/2009, 11:51 PM   #3 (permalink)
ndz
Member
 
Join Date: Jun 2009
Posts: 114
Likes Received: 0
Thanks: 34
Thanked 25 Times in 13 Posts
Default

+1 for % meter instead of the icon.
ndz is offline   Reply With Quote
Old 07/21/2009, 11:58 PM   #4 (permalink)
Member
 
Join Date: Jun 2009
Posts: 51
Likes Received: 0
Thanks: 29
Thanked 5 Times in 4 Posts
Default

Quote:
Originally Posted by ndz View Post
+1 for % meter instead of the icon.
ditto that
cannibal869 is offline   Reply With Quote
Old 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
Default

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?
nesl247 is offline   Reply With Quote
Old 07/22/2009, 01:52 AM   #6 (permalink)
Member
 
Join Date: Jun 2009
Location: San Diego
Posts: 199
Likes Received: 0
Thanks: 46
Thanked 20 Times in 20 Posts
Default

/sbin/initctl stop LunaSysMgr

then

/sbin/initctl start LunaSysMgr
__________________
jrdejavux is offline   Reply With Quote
Old 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
Default

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.
nesl247 is offline   Reply With Quote
Old 07/22/2009, 08:54 AM   #8 (permalink)
Member
 
Join Date: Jul 2009
Posts: 17
Likes Received: 0
Thanks: 8
Thanked 3 Times in 3 Posts
Default

nesl247, I'm at the same point. Just put a URL without the h t t p : / / part. Then people can copy and paste the URL if they really want it.
phrough is offline   Reply With Quote
Old 07/22/2009, 09:37 AM   #9 (permalink)
Member
 
Webby_s's Avatar
 
Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
Default

Or you could post it over at the webOS internal Wiki Main Page - WebOS Internals
Webby_s is offline   Reply With Quote
Old 07/22/2009, 12:13 PM   #10 (permalink)
Member
 
Join Date: Jun 2009
Posts: 10
Likes Received: 0
Thanks: 3
Thanked 1 Time in 1 Post
Default

I would sure love this info.
bigbrown is offline   Reply With Quote
Old 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
Default

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.
nesl247 is offline   Reply With Quote
Thanked by mamouton, nelson1900
Old 07/22/2009, 01:18 PM   #12 (permalink)
Member
 
Webby_s's Avatar
 
Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
Default

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)
Webby_s is offline   Reply With Quote
Old 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
Default

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.
nesl247 is offline   Reply With Quote
Old 07/22/2009, 02:32 PM   #14 (permalink)
Member
 
Webby_s's Avatar
 
Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
Default

I keep getting
Code:
/bin/sh: patch: not found
Webby_s is offline   Reply With Quote
Old 07/22/2009, 02:34 PM   #15 (permalink)
Member
 
Join Date: Jun 2009
Posts: 71
Likes Received: 0
Thanks: 0
Thanked 35 Times in 8 Posts
Default

Have you setup ipkg-opt and the repository? If so, as root:

ipkg-opt update
ipkg-opt install patch
nesl247 is offline   Reply With Quote
Old 07/22/2009, 02:57 PM   #16 (permalink)
Member
 
Webby_s's Avatar
 
Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
Default

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.
This is how I am doing it all. I copy the file over to the USB I then
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
I then do the write up you have for the patch, I cd / over the the directory and try the patch <

What am I doing wrong? Is there a file name wrong somewhere? Thanks for your patients!
Webby_s is offline   Reply With Quote
Old 07/22/2009, 05:37 PM   #17 (permalink)
Member
 
Webby_s's Avatar
 
Join Date: May 2009
Posts: 284
Likes Received: 0
Thanks: 36
Thanked 22 Times in 17 Posts
Default

Any ideas?
Webby_s is offline   Reply With Quote
Old 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
Default

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.
bigbrown is offline   Reply With Quote
Old 07/22/2009, 06:24 PM   #19 (permalink)
Member
 
Join Date: Jun 2009
Posts: 10
Likes Received: 0
Thanks: 3
Thanked 1 Time in 1 Post
Default

However, now the screen locks while it is charging. That's not normal is it? I thought it stayed unlocked while charging.
bigbrown is offline   Reply With Quote
Old 07/22/2009, 06:55 PM   #20 (permalink)
Forum Leader
 
mamouton's Avatar
 
Join Date: Jan 2007
Location: Fort Worth, TX
Posts: 5,771
Likes Received: 5
Thanks: 796
Thanked 1,165 Times in 801 Posts
Default

Quote:
Originally Posted by nesl247 View Post
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?
Thanks this works is there any way to put a percent sign behind the numbers?
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?
mamouton is offline   Reply With Quote
Reply

 

Tags
battery, hack, icon, percentage

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0