topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday December 11, 2024, 1:52 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Battery indicator in Window Titles  (Read 10504 times)

SleepingWolf

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 118
    • View Profile
    • Read more about this member.
    • Donate to Member
IDEA: Battery indicator in Window Titles
« on: November 06, 2020, 03:01 PM »
Hi folks,
   There are a plethora of different battery indicator thingies out there (power circle and battery cat for example). But the problem with laptops is that you need to remember to ALT-TAB to the program to check the status of your battery -by the time you think to check, the ruddy thing has shut down or hibernated on you.

   What I'm thinking of is something that will print the battery percentage in some form in the title bar of the current active window -it could be appended to the window's title or implemented as a kind of overlay (see Skrommel's TicTocTitle) for an example. In fact, it could even be incorporated as an option in that handy piece of freeware!

   The (almost) ubiquity of the Windows titlebar on most software should ensure that the battery indicator level is foremost in the mind of the user -think of it as subliminal information!

   I hope that is clear and an easy task...
-------------------------------------------

Question everything, use a fact-checker.
Respect yourself and respect others.
Peace out!

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 736
  • Call me Vic!
    • View Profile
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #1 on: November 06, 2020, 03:45 PM »
   The (almost) ubiquity of the Windows titlebar on most software should ensure that the battery indicator level is foremost in the mind of the user -think of it as subliminal information!

   I hope that is clear and an easy task...

It is! I'm on it :Thmbsup:
My name's Victor but do feel free to call me Vic! (now known as "paradisusvic")

❤️ Support on Patreon @ www.patreon.com/paradisusis
New Email/Paypal: paradisusvicgmail.com

SleepingWolf

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 118
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #2 on: November 07, 2020, 01:08 PM »
Thanks, Vic.
-------------------------------------------

Question everything, use a fact-checker.
Respect yourself and respect others.
Peace out!

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #3 on: November 10, 2020, 10:53 AM »
Here is a quick and dirty app I made called Title Battery.

No install, just run and it sits in the system tray. Click the icon for the menu to exit, No custom features, It uses the following command line to get the battery. Tested on Windows 10.

WMIC PATH Win32_Battery Get EstimatedChargeRemaining

https://filedn.com/l.../Title%20Battery.zip


SleepingWolf

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 118
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #4 on: November 10, 2020, 11:49 AM »
Hi c.gingerich, I'm afraid that is not working on Windows 8.1 (at least on my laptop).

On most windows with titles, I can see the title is appended with the characters "- [Battery life remaining: %]" (note that no number is shown before the % sign) before the original title-part is deleted one character at a time -at a rate of roughly one char a second. Therefore, after a few seconds, the windows' title is shown in WinLister as "- [Battery life remaining: %]" and of course there are many such windows, now with unhelpful names.

I'd upload some screenshots, but I'm not sure how to go about that... it will keep for now! Thanks for trying, perhaps other Windows 8.1 users can also try it and verify whether it works, as my system is far from standard! If one person benefits then, (assuming it WAS a quick hack), it would have been worth while.

- [Battery life remaining %] -screenshot.jpgIDEA: Battery indicator in Window Titles
-------------------------------------------

Question everything, use a fact-checker.
Respect yourself and respect others.
Peace out!

SleepingWolf

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 118
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #5 on: November 10, 2020, 11:56 AM »
P.S.  I'm not fussy about how the title looks, but feel it should be shorter, something like...
original title [BATT:34%]
-------------------------------------------

Question everything, use a fact-checker.
Respect yourself and respect others.
Peace out!

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #6 on: November 10, 2020, 12:38 PM »
The command that he put in his post can be run from the command line- have you tried that on the computer in question?

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #7 on: November 10, 2020, 12:39 PM »
P.S.  I'm not fussy about how the title looks, but feel it should be shorter, something like...
original title [BATT:34%]

I'll try allow custom text, it may take me a little to get to it.
« Last Edit: November 10, 2020, 02:00 PM by c.gingerich »

SleepingWolf

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 118
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #8 on: November 10, 2020, 05:42 PM »
The command that he put in his post can be run from the command line- have you tried that on the computer in question?

I'm glad you told me that -I didn't recognize it, wondered if it was a C call or something.

So, I tried it, it worked!

command prompt.jpgIDEA: Battery indicator in Window Titles
-------------------------------------------

Question everything, use a fact-checker.
Respect yourself and respect others.
Peace out!

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #9 on: November 11, 2020, 02:08 PM »
Progress update: I have it mostly working. The issue I am facing is that I am using the window CLASS for identification. If the title text changes from a different outside source (i.e. path change on an explorer window) the text will revert back to the initial text. Here is a short gif showing what I mean - https://a.cl.ly/o0umnx1m

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #10 on: November 11, 2020, 03:09 PM »
Here's my take on this snack: http://www.dcmembers...nacks/TB_Battery.zip

Still early and not feature complete, but the basic functionality is there.  It looks like this:

Screenshot 2020-11-11 150454.png

Notes:

  • Currently, it updates every fifteen seconds (will be made configurable at some point).
  • A plus in front of the battery glyph shows that you're charging (plugged in) while a minus shows that you're discharging (not plugged in).
  • Exiting from the tray icon should clean up the titlebars' text.
  • This suffers from the same issue as Chris' in that windows that constantly update their titlebar text will remove the battery info.  However, the fifteen second timer will bring it back.
« Last Edit: November 11, 2020, 07:00 PM by skwire »

SleepingWolf

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 118
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #11 on: November 11, 2020, 04:44 PM »
That looks great Skwire, but Avira just quarantined it (even though VirusTotal showed no problems). False positive, I'm sure, but I'm going to need some time to find a workaround to eventually test it!
-------------------------------------------

Question everything, use a fact-checker.
Respect yourself and respect others.
Peace out!

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #12 on: November 11, 2020, 06:36 PM »
I'm going to need some time to find a workaround

Is there no way to whitelist a file within Avira?

SleepingWolf

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 118
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #13 on: November 14, 2020, 10:06 AM »
(EDIT -deleted duplicated screenshot)

Is there no way to whitelist a file within Avira?

You would think so. I must admit, I'm getting more and more annoyed with Avira and other non-standard, simplyfied guis -I can't help wondering if there are more Avira tools installed than are shown in the Windows menu. One 'page' somewhere of the options -probably when I sent off the file for analysis, did not fit on my screen properly and therefore I'm guessing some controls -such as a save button were not shown. Clicking on the 'settings' button in Security gives me the following underwhelming set of options to change... "Language".    Amazing...

Avira settings.jpgIDEA: Battery indicator in Window Titles
-------------------------------------------

Question everything, use a fact-checker.
Respect yourself and respect others.
Peace out!
« Last Edit: November 14, 2020, 02:19 PM by skwire, Reason: Fixed quoting »

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #14 on: November 14, 2020, 05:30 PM »
To me, Avira seemed more like a virus than many of the virii it protected against.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #15 on: November 15, 2020, 05:36 AM »
Here's my take on this snack: http://www.dcmembers...nacks/TB_Battery.zip

Still early and not feature complete, but the basic functionality is there.  It looks like this:

[ Invalid Attachment ]

Notes:

  • Currently, it updates every fifteen seconds (will be made configurable at some point).
  • A plus in front of the battery glyph shows that you're charging (plugged in) while a minus shows that you're discharging (not plugged in).
  • Exiting from the tray icon should clean up the titlebars' text.
  • This suffers from the same issue as Chris' in that windows that constantly update their titlebar text will remove the battery info.  However, the fifteen second timer will bring it back.

this program goes fine for me.
 :-* :P

SleepingWolf

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 118
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #16 on: November 15, 2020, 10:10 AM »
To me, Avira seemed more like a virus than many of the virii it protected against.

Yes, I'm coming around to that POV. What would you recommend?
-------------------------------------------

Question everything, use a fact-checker.
Respect yourself and respect others.
Peace out!

SleepingWolf

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 118
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #17 on: November 15, 2020, 10:14 AM »

this program goes fine for me.
 :-* :P

Pray tell, Are you using Windows 8, 8.1 or what?
-------------------------------------------

Question everything, use a fact-checker.
Respect yourself and respect others.
Peace out!

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #18 on: November 15, 2020, 01:05 PM »
To me, Avira seemed more like a virus than many of the virii it protected against.

Yes, I'm coming around to that POV. What would you recommend?

I use Malwarebytes personally, and it hasn't been too intrusive.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: IDEA: Battery indicator in Window Titles
« Reply #19 on: November 17, 2020, 07:43 PM »

this program goes fine for me.
 :-* :P

Pray tell, Are you using Windows 8, 8.1 or what?
Windows 10 home spanish
 :-*