Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • September 03, 2015, 02:18:00 PM
  • Proudly celebrating 10 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

Last post Author Topic: DONE: Date/Time and Battery Status Bar  (Read 13748 times)

rsatrioadi

  • Participant
  • Joined in 2009
  • *
  • Posts: 58
    • View Profile
    • Donate to Member
DONE: Date/Time and Battery Status Bar
« on: November 25, 2010, 10:31:39 PM »
First things first, English is not my native language so I apologize if I'm not very clear.

When using a notebook, I usually don't hide the taskbar for three main reasons: quick launch, clock, and battery notification. I like my app launcher (in this case Quick Launch) to be always visible, so that to launch a program I only need two actions: locate the program's icon and click the icon. Setting to auto hide means more actions: show the launcher, locate the icon, and then click the icon. I also need the clock to be always visible as a quick reminder for lunch break or other small things that just don't worth having a dedicated reminder program for them. The battery notification is to remind me when I need to plug/unplug the adaptor.

But I also have a netbook, and with netbooks, screen estate is very limited, so I choose to auto hide the taskbar. I'm OK with trading quick launch for screen height, but I still need the clock and battery notification to be always visible. So, what I'd like to have is a small bar that stays on top of the screen, about 12 pixels or so in height, just to show the current date, time, and battery status. The bar should also resize the screen work area so that it doesn't cover the titlebar of a maximized window. I attached a simple mock up to show what I mean.

mock-up.png

Additionally, it is also nice if the battery status info changes color, let's say red when in critical battery level and green when the battery is fully charged. I also prefer 24-hour format.

Similar programs are StatBar and Rainlendar I believe, but they are too complex for what I need.


- Satrio -

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,219
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #1 on: November 25, 2010, 10:45:38 PM »
you could try WinBar, that has several configurable options.


http://sourceforge.net/projects/winbar/

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 565
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #2 on: November 25, 2010, 10:50:04 PM »
That setup is such a huge collossal waste. I wouldn't want it like that. ;)

For one, you now permanently trade away like a dozen vertical pixels all over your screen. Second, some of that stuff is so vocal.. it's depressing.

Wouldn't a really tiny always-on-top window work better? It could be positioned right below the minimize/maximize/close buttons since on Vista+ they're about only half as high as usual anyway. There's next to nothing it could cover by accident I think, seeing how that spot is rarely used in the first place no matter how you arrange your windows. Or you could do the same just to the left of those buttons, although that might be more likely to cover something by accident.

Don't get me wrong; it is very possible to reserve the top row. But if it is space you want on your screen, reserving a whole horizontal strip is madness. Ever since I've gone widescreen I've put my taskbar vertical just so I waste less useful space.

Let me know what you think. If I find a bit of time, I can quite likely code that up for you.

rsatrioadi

  • Participant
  • Joined in 2009
  • *
  • Posts: 58
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #3 on: November 25, 2010, 11:00:00 PM »
@lanux128

I only need the battery and date/time info, so maybe WinBar is an overkill. I have tried StatBar that has similar function, but it is not resource friendly to run on a netbook. I left my netbook home right now so I can't try it on my netbook. I'll give it a try once I get home and let you know how it works, but I still think that WinBar is also an overkill :)

@worstje

That's a great idea! I didn't think about that before :up:
Please do code it for me whenever you have a time. Thank you very much :D

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,219
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #4 on: November 25, 2010, 11:17:26 PM »
yup, WinBar might be overkill. i bet worstje's handiwork will be much more customised to your needs. i too could do with such a tool on my wife's netbook.  :)

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 565
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #5 on: November 26, 2010, 12:39:43 AM »
I'll try to find some time in the next few days. There's no rush, I hope?

Otherwise, I am sure someone else would be just as glad to take care of it.

rsatrioadi

  • Participant
  • Joined in 2009
  • *
  • Posts: 58
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #6 on: November 26, 2010, 12:45:49 AM »
No rush, it's perfectly fine. Take your time :)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,393
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #7 on: November 26, 2010, 10:59:14 AM »
These may or may not suit your needs but I thought I throw them out there anyway.

Battery Status - http://www.donationc...ex.php?topic=20301.0
Battery Bar - http://osirisdevelop...atteryBar/index.html
Power Meter - http://jdsoft.eu/software/PowerMeter/
Battery Info - http://www.batteryinfo.de.vu/

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 565
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #8 on: November 26, 2010, 11:08:14 AM »
I present to all of you... Teensymon v0.3.0!

You can get it from the Teensymon open directory. You can find this version and any future versions I happen to release at that location. (Saves me from updating links left and right, yes?)

I was too lazy to add in tons of stuff involving configurability, and went for the bare necessities:
  • Anti-feature: Black background
  • Anti-feature: White text
  • Anti-feature: A single line of a tiny 8pt Consolas font
  • Feature: Shows whether you are using battery (DC) or current from your wall (AC).
  • Feature: Shows how long you have till your battery takes a nap.
  • Feature: Shows how long it takes for your battery to fully recharge. (Sadly, it seems the nature of batteries aging means it instead becomes an impossibly long to satisfy time the further it gets along with charging.)
  • Feature: Left-click and drag around.
  • Feature: Middle-click hides for 5 seconds in case it gets in the way.
  • Feature: Right-click offers a menu with an About and an Exit option.
  • Feature: The file is only 45kb large. It can't get much smaller than that!

Stuff that might need adding in future versions:
  • A configuration file with settings like the colours used, more detail about the date formats and such to use, etc.

All in all, I have tried to keep the output as short as possible, but I think the long date format from your mockup is not as useful as you might expect it to be in the new drag around format. I think something like 2010-11-26 18:07 is shorter, more to the point and friendlier to your limited screen real-estate. But for now the long date format is what it shows as it most closely matches what you requested. :)

If there is anything else you'd like to see added, give a shout and I'll see what I can do. :)

Edit: Oh right. I have a habit of compiling against the redistributable libs as opposed to a full all-in-one package, so you may need to get Microsoft Visual C++ 2010 Redistributable Package (x86) to run it.

(That all kind of throws my 'only 45kb' argument out of the window, huh? Well, just wait till you get dozens of apps needing those libs, then you'll see it saves space.  :D)
« Last Edit: November 26, 2010, 04:10:48 PM by worstje »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,393
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #9 on: November 26, 2010, 12:21:46 PM »
Nicely done, worstje.   :D

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,562
    • View Profile
    • App's Apps
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #10 on: November 26, 2010, 07:59:17 PM »
One of the apps I can't live without is a tiny, always on top clock that I made. (Despite having a desktop PC with a large widescreen monitor, I still like my taskbar hidden)

Screenshot - 11_26_2010 , 8_46_26 PM.png

Size & colors can be user configured and you can position it anywhere you want. You are not restricted to which part of the screen to place it on...only restricted to not being able to move it off the screen of your main display (not entirely multi-monitor friendly)

http://appsapps.info/dclock2.php

rsatrioadi

  • Participant
  • Joined in 2009
  • *
  • Posts: 58
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #11 on: November 26, 2010, 09:31:16 PM »
@worstje

Nice little program!  :Thmbsup:
However I cannot run the program on my Windows 7 32-bit netbook. (I have installed the redistributable package.) I tried it in Windows Vista 32-bit (my work computer) and it worked, but after several minutes it also went crashed. Here's the error I got in Windows 7:

Quote
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   Teensymon.exe
  Application Version:   0.3.0.0
  Application Timestamp:   4cefe689
  Fault Module Name:   Teensymon.exe
  Fault Module Version:   0.3.0.0
  Fault Module Timestamp:   4cefe689
  Exception Code:   c0000094
  Exception Offset:   000013ce
  OS Version:   6.1.7600.2.0.0.256.1
  Locale ID:   1057
  Additional Information 1:   0a9e
  Additional Information 2:   0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:   0a9e
  Additional Information 4:   0a9e372d3b4ad19135b953a78882e789

What seems to be the problem?

Anyway, about the date format -- where I live, we usually use DD-MM-YYYY format, while the rest of the world seems to be using MM-DD-YYYY format. This has led to many case of confusion when using all-digit date format. That's why I prefer to display the month's name. But perhaps shorter words (e.g. Sat, Nov 27, 2010) is better to save space. Would you do that?  ;)

Oh, and I love the anti-features, Exactly what I need!  :Thmbsup:

Thanks,
- Satrio -

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 565
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #12 on: November 26, 2010, 09:36:25 PM »
Hrm, that's weird. A crash?

I've had it running on my 32-bit XP laptop for several hours, and on my desktop (without the battery info, obviously) as well. I'll dive into the issue and see what I can do to fix it.

And yeah - sometimes less choice is more choice. That's how the Apple-fanatics reason, right? xD

rsatrioadi

  • Participant
  • Joined in 2009
  • *
  • Posts: 58
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #13 on: November 26, 2010, 09:44:25 PM »
@lanux12

I have tried WinBar, it's nice and more friendly than StatBar, but still not exactly what I need :)

@skwire & app103

Power Meter + app's DClock 2 look like what I need but the Power Meter wastes too much space :(

@worstje

Thanks :)
BTW for my main work station I actually prefer more choices, but for a netbook the simpler the better ;)

cmpm

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 2,025
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #14 on: November 26, 2010, 10:06:20 PM »
here is some battery care programs
configurable to save battery life in battery mode

http://batterycare.b...com/en/download.html

http://www.powerplan7.com/

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 565
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #15 on: November 26, 2010, 10:10:56 PM »
rsatrioadi, is there any chance we could talk on IRC? To be honest, I am pretty clueless where to find the error as I can't reproduce it, and while I have a tiny inkling of things I could try to change, I might have a bit more luck in a direct conversation to zero in on the issue.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,219
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #16 on: November 26, 2010, 11:34:33 PM »
nice work, worstje! it runs fine on my netboook.. :Thmbsup:

Teensymon_001.png

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 565
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #17 on: November 26, 2010, 11:38:03 PM »
I believe I fixed the bug, and then some.

Teensymon v0.3.1 can be found in the Teensymon open directory.

Changes:  (mostly for my own memory if problems persist; I've been too lazy to set up source control or backups. :-\)
  • Fixed: check against a (dis)charge rate reported as 0. (Although the Windows API documentation implies that should never be returned.. which is likely the reason only some computers with some batteries have it, depending on the exact model of battery in their computer.)
  • Fixed: popup menu memory leak
  • Extra sanity protection: clearing battery buffers before requesting data
  • Change: the date format now matches the request from the original user.

Whenever I find time for v0.4 is when I'll add some sort of configuration file so people can properly adjust stuff without me needing to hardcode things. But with two NANY submissions that still need a fair bit of attention, I'm not diving into all those details for now. :)
« Last Edit: November 26, 2010, 11:40:31 PM by worstje »

rsatrioadi

  • Participant
  • Joined in 2009
  • *
  • Posts: 58
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #18 on: November 27, 2010, 04:28:04 AM »
Sorry for late reply, I was out for business lunch  :-[

v0.3.1 now works fine both in my win Vista work station and my win 7 netbook, great job! :Thmbsup:
(On a side note, I've really never been on IRC :P)

Once again I thank you worstje for your great work and the rest of DC for your suggestions :)

rsatrioadi

  • Participant
  • Joined in 2009
  • *
  • Posts: 58
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #19 on: November 27, 2010, 04:52:14 AM »
Two more things:

First, since the bar width is dynamic (e.g. when the battery is fully charged, it shrinks because it no longer shows the time remaining) and I am using it on the rightmost of the screen (under the min/max/close buttons as you suggested), perhaps you can make the bar to align to the right?

Second, since I rarely use mice when using a netbook and the touch pad doesn't have a middle button, perhaps I can use something like Ctrl+left click to temporarily hide the bar instead of middle click?

Thank you :)

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 565
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #20 on: November 27, 2010, 03:20:57 PM »
Sure, I'll take care of those issues when I have a bit of time.

(My laptops touchpad uses a two-fingersalute-on-the-touchpad to mimick the middle mouse button. Does that work for your netbook?)

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,513
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #21 on: November 27, 2010, 07:56:33 PM »
Nicely done. Thanks.

One can just put msvcr100.dll (743 KB) in the application folder to run Teensymon.exe

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 565
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #22 on: January 28, 2011, 11:01:13 AM »
Ok, it's taken me long enough to get off my lazy arse. >:( Sadly, I just had to hack the features you wanted in as opposed to make a nice configuration file as I intended - I've just been too busy with other things and figured just having the changes would make you happy enough after two whole months of waiting.

Teensymon v0.3.2 can be found in the Teensymon open directory.

Teensymon
v0.3.2 (2011-01-28)

This is a minimal app to keep an eye on your battery. No fuss, no features,
just the state of your battery. Laptops, netbooks and other battery-fueled
nice-to-haves are slow enough without a full-featured electrons-guzzling and
cpu-hogging monitoring tool. What you see is what you get.

Future versions might get a teensy bit of configurability.

Teensymon was requested by rsatrioadi at:
    http://www.donationc...ex.php?topic=24704.0



VERSION HISTORY
---------------

v0.3.2 (2011-01-28)

    Changed some things as requested by rsatrioadi.
   
      Added: Ctrl+LeftMouseButton is now an alternative for MiddleMouseButton.
      Changed: Where before Teensymon was left-top aligned, it is now aligned
          to the bottom-right. This way it doesn't jump around as much since
          Teensymon is expected to be run somewhere at the right side of the
          screen.
      Added: This ReadMe wasn't here in previous versions. Oops.



rsatrioadi

  • Participant
  • Joined in 2009
  • *
  • Posts: 58
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #23 on: February 11, 2011, 12:33:14 AM »
Hi worstje, it's been a while... I've also been busy.   :-[

First of all, thank you for making the changes I requested. :D

I have tried the new version and it works as I wanted, but with one tiny issue: for example I temporarily hide the bar by middle-clicking or Ctrl+clicking it and switch the focus to another program (let's say Notepad). After 5 seconds the bar shows itself but also gains focus, and therefore the Notepad window loses focus. This may cause unwanted interruption, but since I don't use my netbook for any critical tasks, I don't really need a fix for this. I am happy with the current version and my netbook will never boot (Windows) without Teensymon. :Thmbsup:

With its current version, I wouldn't need any configuration files, so unless somebody else asks for configurability, I don't think you need to make any other changes. :)

Once again, thank you very much.  ;)

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 565
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: IDEA: Date/Time and Battery Status Bar
« Reply #24 on: February 11, 2011, 10:01:03 AM »
Hmm, I'm not exactly sure how to fix that window-activation off the bat, but I'll give it some thought. Teensymon was the last application in use by the user before it disappeared, so when it pops up again Windows automatically gives it focus again.

There's probably some NOACTIVATE flag in there somewhere, so I'll give that a lookie tomorrow. :)