maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] OS2008 Statusbar Clock (https://talk.maemo.org/showthread.php?t=16574)

fiferboy 2008-02-13 15:32

[Announce] OS2008 Statusbar Clock - updated
 
2 Attachment(s)
Hello all,

After reading a post on the Maemo UI improvements blog (http://tabletui.wordpress.com/) I realized that I would really like to see a clock in the statusbar of my N810. After a little while I also realized that I could do this myself, so I did.

A note before installing! I have tested this on my N810 (after doing a backup first ;) ) and have had no problems. In theory it should work on any N810 or N800 running OS2008, but my testing has been minimal. It ran overnight with no performance issues, and it can be added and removed from the statusbar without crashing the desktop (now). Please use this at your own risk, as I am not responsible for any loss of data or damage that may occur.

That being said, it is a very simple application and should not have any problems.

The way the Maemo statusbar is designed I could not fit a full clock in the limited width available, so I took another idea from Maemo UI improvments - a double wide "din" plugin. It is actually two plugins, one for the hour display and one for the minutes display. You should list minutes first when arranging them in the control panel. I would recommend placing it at the very top of the list, but it should be fine anywhere. Too low in the list, however, and you run the risk of having the display split when the statusbar extends two a two-level statusbar.

Currently the font size (18) and colour (white) are hardcoded. I think this should be fine with most themes, and I plan on making it configurable in the future. The only customization at this point is in ".statusbar_clock.rc" in your home directory. Change the line with "ampm" to switch between 24 hour mode and AM/PM mode.

If anyone wants the source, let me know since I have not uploaded it anywhere yet. I am a programmer, but I just hacked this together after looking at a few statusbar plugins.

Please let me know if there are any issues or improvements you can find. I'm sure some people may find this a complete waste of space given the limited real estate of the statusbar, but for anyone who would like the option of a clock in the statusbar - enjoy!

EDIT: Source code (and installable package) now available at
http://andrew.olmsted.ca/maemo/statusbar-clock

UPDATE: I have now made version 0.0.2 available. Improvements include:
  • Hide leading zero in AM/PM mode
  • Popup menu on click
  • Show current date (in popup menu)
  • Launch world clock (from popup menu)
  • Easily set 24 hour time (check item in popup menu)

UPDATE: 0.0.3 is available. It adds a configuration dialog to select the font and font colour. Hopefully alarm interface will be coming with the next version.

UPDATE: A garage project has been created for statusbar-clock. Please visit https://garage.maemo.org/projects/statusbarclock/ for the latest release and source code (I will leave the package for 0.0.3 here until the next release, then packages will only be available on the garage site)

UPDATE: Version 0.5 is now available at the garage page mentioned above. This version adds "stacked" mode for displaying the minutes over top of the AM/PM indicator. There is also a lot of cleanup and a few bug fixes which should result in reduced CPU usage.

UPDATE: Version 0.6 has been released at the garage page. This version adds an alarm interface and upcoming alarm notification via user selectable colours.

zeez 2008-02-13 15:48

Re: [Announce] OS2008 Statusbar Clock
 
One suggestion: it would be nice if clicking the icon (well either one in this case) would launch the clock.. Very very nice! Thanks a lot!!

Benson 2008-02-13 15:52

Re: [Announce] OS2008 Statusbar Clock
 
Cool, but, yeah, with the current limited status-bar room... not so useful for me.

What's that half-n-half icon for volume and ???(brightness maybe?)?

fiferboy 2008-02-13 15:54

Re: [Announce] OS2008 Statusbar Clock
 
Quote:

Originally Posted by Benson (Post 141969)
Cool, but, yeah, with the current limited status-bar room... not so useful for me.

What's that half-n-half icon for volume and ???(brightness maybe?)?

That is the Advanced Backlight Statusbar Applet. It does indeed control brightness and volume, saving a bit of space that I use up with the clock ;)

http://www.internettablettalk.com/fo...ad.php?t=16531

Thanks for the comment.

Benson 2008-02-13 16:07

Re: [Announce] OS2008 Statusbar Clock
 
Must be a new version, I have an older one. Many thanks!

/me goes to find and install new version.
/me returns with big :D.

You know, I currently use osso-statusbar-cpu (or something like that) to display CPU and mem with overlayed clock. But the clock is small and hard to read. It'd be cool to get this 'fat clock' with CPU under hours and mem under minutes, and the ability to run commands from it. So, at some point, I could really use that source code. (I don't have SDK set up yet, and it'll prob'ly be at least a month before I get time... But if the source is released now, I can always hope someone else fixes it in the mean time.)

fiferboy 2008-02-13 16:11

Re: [Announce] OS2008 Statusbar Clock
 
Benson,

I was thinking of overloading the plugins so they had something "useful" running underneath. CPU and MEM are a good idea, as is launching commands. I will look at it, but it probably won't make it in for a couple of releases (if I can work it at all).

I am looking at uploading the source and package somewhere. I have a homepage, but the server has been a bit up-and-down lately. I also have an unrelated garage page that I could maybe put this on.

traveller604 2008-02-13 16:16

Re: [Announce] OS2008 Statusbar Clock
 
Quote:

Originally Posted by fiferboy (Post 141959)
The only customization at this point is in ".statusbar_clock.rc" in your home directory. Change the line with "ampm" to switch between 24 hour mode and AM/PM mode.

Umm where? There are no files in my home directory apart from 1 folder, "user".

Also what do I have to change the line to to get a 24h format?

Thanks..

fiferboy 2008-02-13 16:19

Re: [Announce] OS2008 Statusbar Clock
 
traveller,

It is a hidden file that gets created after the first time you load the plugin. To change the file from XTerm run the command:

Code:

vi ~/.statusbar_clock.rc
Then change the line that says:

Code:

ampm=true
to

Code:

ampm=false
Let me know if that works for you. To have the change take effect, unload the plugins from control panel, then load them again.

zeez 2008-02-13 16:19

Re: [Announce] OS2008 Statusbar Clock
 
Your home dir is the user dir in /home/.
Change the line to ampm=false

Damn too slow...

TA-t3 2008-02-13 16:20

Re: [Announce] OS2008 Statusbar Clock
 
Your home directory is /home/user/
ls -lAC (in xterm)
will show any file .statusbar_clock.rc, if it exists.

EDIT: Even more too slow.. triple is better than none I expect though ;)


All times are GMT. The time now is 02:05.

vBulletin® Version 3.8.8