AminetAminet
Search:
83742 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/time/ScreenTime.lha

Mirror:Random
Showing:m68k-amigaosgeneric
No screenshot available
Short:Screen clock, configurable with locale
Author:Kim Fastrup Larsen
Uploader:kimflarsen hotmail com (Kim Fastrup Larsen)
Type:util/time
Version:1.4
Architecture:m68k-amigaos >= 2.0
Date:2022-01-07
Download:http://aminet.net/util/time/ScreenTime.lha - View contents
Readme:http://aminet.net/util/time/ScreenTime.readme
Downloads:1564

New in version 1.4:
-------------------

- If screennotify.library is available, a clock on the Work-
  bench screen will now automatically close and reopen when
  the Workbench needs to close and reopen its screen.
- The user can now define a global hot key for bringing up
  the calendar.
- The calendar window now sports a menu.
- Now comes with an install script.


What is ScreenTime?
-------------------

ScreenTime is a commodity that will display the current time
on the Workbench or any other public screen. By default,
ScreenTime will open a small borderless window on top of the
screen bar, adopting the font and colors of the screen to
make it look like it's part of it, but the position, font or
colors can all be configured using tool types or Shell argu-
ments.

When running on Workbench 2, ScreenTime will use a simple
hh:mm:ss format. On Workbench 2.1 or later, you can choose
between a number of formats defined by your locale that show
different combinations of time and date, or you can create
your own custom format that can also include things like day
of the week and week number.

A calendar for the current month can be brought up by click-
ing on the clock, or using a configurable hot key, and from
here the user can browse through past or future months.

ScreenTime requires Kickstart 2 or later. Full source code
is included.


Installation
------------

To have ScreenTime start automatically whenever you boot
your system, simply run the installer included. This will
install ScreenTime in SYS:WBStartup, or update it there if
it is already installed. Updating in this manner will not
replace the icon, so you will not lose your current configu-
ration.

The installer will also install language files for existing
languages. ScreenTime currently supports English, Danish,
German and Italian.


Operation
---------

Clicking the clock will bring up a calendar for the current
month. You can also define a global hot key for bringing up
the calendar (more on this below). A pair of buttons allow
you to browse through other months. Alternatively, you can
use the left and right arrow keys on your keyboard for the
same purpose. Click the clock again or press Esc (or the
global hot key) to dismiss the calendar.

You can run multiple instances of ScreenTime at the same
time if you want the time displayed on several screens at
once, but only one for each screen. Each instance will be
given a different commodity name that includes the screen
name so that they can be told apart in Commodities Exchange.
To remove an instance of ScreenTime, run it again (using the
same screen specification), or use Commodities Exchange.

Note that if you change your system time, it can happen that
the clock stops updating due to the manner in which it waits
for the system time to change. The program is still running
just fine, but it might be waiting for a moment in time that
is now far in the future. If this happens, You will need to
restart the program or use Commodities Exchange to de- and
reactivate it.


Configuration
-------------

If you start ScreenTime from the Workbench or by placing it
in WBStartup, you configure it through tool types. If you
start it from a Shell or the User-Startup, you use command
line arguments.

You specify the desired format using the FORMAT tool type or
argument. There are six different locale-defined formats to
choose from:

 TIME
 DATE
 DATETIME
 SHORTTIME
 SHORTDATE
 SHORTDATETIME

What you get in each case depends on your locale. Some of
them may give the same result in some locales. By default,
ScreenTime will use the TIME format, equivalent to using

 FORMAT=TIME

You can also create your own custom format. For example,

 FORMAT=%a %q:%M

will show the abbreviated week day, followed by a space,
followed by the hour (in 24-hour format), followed by a
colon, followed by the minutes.

You can include any characters in the string, but every ap-
pearance of a % character followed by a single letter is
taken as a command to insert a particular element of the
current time into the string at that position - to display
an actual % character, use %%.

The commands available are defined by the locale. They are:

 %a - abbreviated weekday name
 %A - weekday name
 %b - abbreviated month name
 %B - month name
 %c - same as "%a %b %d %H:%M:%S %Y"
 %C - same as "%a %b %e %T %Z %Y"
 %d - day number with leading 0s
 %D - same as "%m/%d/%y"
 %e - day number with leading spaces
 %h - abbreviated month name
 %H - hour using 24-hour style with leading 0s
 %I - hour using 12-hour style with leading 0s
 %j - julian date
 %m - month number with leading 0s
 %M - the number of minutes with leading 0s
 %p - AM or PM strings
 %q - hour using 24-hour style
 %Q - hour using 12-hour style
 %r - same as "%I:%M:%S %p"
 %R - same as "%H:%M"
 %S - number of seconds with leadings 0s
 %T - same as "%H:%M:%S"
 %U - week number, taking Sunday as first day of week
 %w - weekday number
 %W - week number, taking Monday as first day of week
 %x - same as "%m/%d/%y"
 %X - same as "%H:%M:%S"
 %y - year using two digits with leading 0s
 %Y - year using four digits with leading 0s

You specify which public screen you want the time displayed
on by using the PUBSCREEN tool type or Shell argument.

Use MARGIN_TOP and MARGIN_RIGHT to specify the position of
ScreenMenu's window. The default values are 1 and 30, re-
spectively.

Use FONT_NAME and FONT_SIZE to specify the font. The font
name must include the .font suffix, as in

 FONT_NAME=topaz.font
 FONT_SIZE=8

If no font is specified, ScreenMenu will use the same font
as the screen bar.

You can specify the colors to be used with TEXT_COLOR and
BACKGROUND_COLOR. The value in each case must be a number
from 0 and up, or -1 to tell ScreenMenu to imitate the
screen bar, the latter being the default behavior.

You can specify the position of the calendar using
CALENDAR_X and CALENDAR_Y. If you specify a position that is
outside the bounds of the screen, it will be adjusted to
place the calendar along the edge. Using -1 will place the
calendar just below the screen bar and on the right edge of
the screen, respectively. This is also the default behavior.

You can define a global hot key for bringing up the calendar
using CALENDAR_POPKEY. By default, no hot key is defined.

There are abbreviations available for some of the command
line arguments when using a Shell or the User-Startup. They
are as follows:

 TOP for MARGIN_TOP
 RT for MARGIN_RIGHT
 FNAM for FONT_NAME
 FSIZ for FONT_SIZE
 COL for TEXT_COLOR
 BG for BACKGROUND_COLOR
 CALX for CALENDAR_X
 CALY for CALENDAR_Y
 CALKEY for CALENDAR_POPKEY


Miscellaneous
-------------

Thank you to Stefan Haubenthal for the German translation,
and to Samir Hawamdeh for the Italian translation, and to
the people who gave suggestions and feedback that helped me
improve ScreenTime!

Check out some of my other Amiga software on Aminet:

Harmonics - mus/edit/harmonics.lha

- A simple additive synthesizer.

KoalaView - gfx/show/KoalaView.lha

- View and convert Commodore 64 images with authentic
  looking colors.

Labyrinth - game/misc/labyrinth64.lha

- Remake of the Commodore 64 game Labyrinth published by
  Commodore in 1983.

Space Invaders - game/shoot/spaceinv.lha

- Arcade perfect and system friendly.

ToolsMenu - util/cdity/ToolsMenu.lha

- Add tools and projects to the Workbench menu, using a
  simple interface similar to FKey.


History:
--------

1.4 (Jan 6, 2022)

- If screennotify.library is available, a clock on the Work-
  bench screen will now automatically close and reopen when
  the Workbench needs to close and reopen its screen.
- The user can now define a global hot key for bringing up
  the calendar.
- The calendar window now sports a menu.
- Now comes with an install script.

1.3 (Feb 1, 2021)

- The placement of the calendar can now be specified with
  tool types or Shell arguments.
- The calendar can now be dismissed by pressing the Esc key.
- Added abbreviations for several of the Shell arguments.
- Added the DONOTWAIT tool type to the program icon.

1.2.2 (Mar 31, 2020):

- Fixed a bug in the calendar where, if you were on the last
  day of the month, the next and previous month would be
  incorrectly rendered.

1.2.1 (Jan 24, 2020):

- Tried to make the calendar layout routines more compatible
  with certain patches or versions of the AmigaOS that mess
  with window title bars and cause problems when precalcu-
  lating the size of windows that do not have titles.
- Removed the spacing added in 1.2 since it might not be de-
  sirable when using alternative colors, and since it can be
  added manually using the format string anyway.
- Now includes Italian translation by Samir Hawamdeh.

1.2 (Jan 16, 2020)

- Clicking the clock now pops up a calendar for the current
  month. Months can be browsed using buttons or the arrow
  keys. Click the clock again to close the calendar.
- Added a bit of spacing at the left edge of the clock to
  cover very long screen titles.
- Now includes German translation by Stefan Haubenthal.

1.1 (Dec 17, 2019)

- Added options to specify position, font and colors.

1.0 (Dec 8, 2019)

- Initial release.


Contents of util/time/ScreenTime.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[unknown]                  252     628  40.1% -lh5- 2c51 Jan  6 11:44 ScreenTime.info
[unknown]                  218     302  72.2% -lh5- 46e0 Jan  6 11:44 ScreenTime/Catalogs/dansk/screentime.catalog
[unknown]                  234     324  72.2% -lh5- 44e1 Jan  6 11:44 ScreenTime/Catalogs/deutsch/screentime.catalog
[unknown]                  291     408  71.3% -lh5- dbd6 Jan  6 11:44 ScreenTime/Catalogs/italiano/screentime.catalog
[unknown]                12641   35147  36.0% -lh5- 7994 Jan  6 11:44 ScreenTime/gpl-3.0.txt
[unknown]                  249     477  52.2% -lh5- 4273 Jan  6 11:44 ScreenTime/gpl-3.0.txt.info
[unknown]                  281     802  35.0% -lh5- c0cf Jan  6 11:44 ScreenTime/Install
[unknown]                  201     836  24.0% -lh5- 5921 Jan  6 11:44 ScreenTime/Install.info
[unknown]                 4022    9940  40.5% -lh5- 8767 Jan  6 11:44 ScreenTime/ReadMe
[unknown]                  246     477  51.6% -lh5- 7f30 Jan  6 11:44 ScreenTime/ReadMe.info
[unknown]                 8925   13800  64.7% -lh5- d504 Jan  6 11:44 ScreenTime/ScreenTime
[unknown]                  420     827  50.8% -lh5- cac5 Jan  6 11:44 ScreenTime/ScreenTime.info
[unknown]                 1592    1592 100.0% -lh0- 9662 Jan  6 11:44 ScreenTime/ScreenTime_ITA.lha
[unknown]                 1694    4964  34.1% -lh5- c508 Jan  6 11:44 ScreenTime/Source/args.c
[unknown]                  675    1119  60.3% -lh5- 074b Jan  6 11:44 ScreenTime/Source/args.h
[unknown]                 1520    3668  41.4% -lh5- 8a74 Jan  6 11:44 ScreenTime/Source/broker.c
[unknown]                  568     961  59.1% -lh5- a043 Jan  6 11:44 ScreenTime/Source/broker.h
[unknown]                  850    1596  53.3% -lh5- ad0a Jan  6 11:44 ScreenTime/Source/catalog.c
[unknown]                  572     935  61.2% -lh5- 3b41 Jan  6 11:44 ScreenTime/Source/catalog.h
[unknown]                  647    1085  59.6% -lh5- a774 Jan  6 11:44 ScreenTime/Source/common.c
[unknown]                  661    1117  59.2% -lh5- a3c7 Jan  6 11:44 ScreenTime/Source/common.h
[unknown]                  562     921  61.0% -lh5- 6dfe Jan  6 11:44 ScreenTime/Source/compiler.h
[unknown]                  784    1622  48.3% -lh5- 1337 Jan  6 11:44 ScreenTime/Source/cx.c
[unknown]                  552     969  57.0% -lh5- ef68 Jan  6 11:44 ScreenTime/Source/cx.h
[unknown]                  324     464  69.8% -lh5- 01e3 Jan  6 11:44 ScreenTime/Source/dansk.ct
[unknown]                 1833    4768  38.4% -lh5- efe1 Jan  6 11:44 ScreenTime/Source/datetime.c
[unknown]                  842    1548  54.4% -lh5- 5dbe Jan  6 11:44 ScreenTime/Source/datetime.h
[unknown]                  340     480  70.8% -lh5- 154c Jan  6 11:44 ScreenTime/Source/deutsch.ct
[unknown]                 1011    2197  46.0% -lh5- 3344 Jan  6 11:44 ScreenTime/Source/error.c
[unknown]                  727    1279  56.8% -lh5- 3a37 Jan  6 11:44 ScreenTime/Source/error.h
[unknown]                 4934   15706  31.4% -lh5- d2c3 Jan  6 11:44 ScreenTime/Source/gui.c
[unknown]                  734    1279  57.4% -lh5- 4263 Jan  6 11:44 ScreenTime/Source/gui.h
[unknown]                 2536    7557  33.6% -lh5- c879 Jan  6 11:44 ScreenTime/Source/guitools.c
[unknown]                  736    1339  55.0% -lh5- 63dd Jan  6 11:44 ScreenTime/Source/guitools.h
[unknown]                 1468    3890  37.7% -lh5- ca3d Jan  6 11:44 ScreenTime/Source/main.c
[unknown]                   68      68 100.0% -lh0- 7567 Jan  6 11:44 ScreenTime/Source/MakeDirIfNotExists
[unknown]                  291     408  71.3% -lh5- dbd6 Jan  6 11:44 ScreenTime/Source/Resources/Catalogs/italiano/ScreenTime.catalog
[unknown]                  420     827  50.8% -lh5- cac5 Jan  6 11:44 ScreenTime/Source/Resources/ScreenTime.info
[unknown]                  106     141  75.2% -lh5- 76a7 Jan  6 11:44 ScreenTime/Source/SCOPTIONS
[unknown]                  651    1100  59.2% -lh5- 2bbf Jan  6 11:44 ScreenTime/Source/screentime.cd
[unknown]                  768    2081  36.9% -lh5- fd7c Jan  6 11:44 ScreenTime/Source/smakefile
[unknown]                  935    1889  49.5% -lh5- f90d Jan  6 11:44 ScreenTime/Source/snotify.c
[unknown]                  557     907  61.4% -lh5- 4cb5 Jan  6 11:44 ScreenTime/Source/snotify.h
[unknown]                  890    1680  53.0% -lh5- 56d2 Jan  6 11:44 ScreenTime/Source/snprintf.c
[unknown]                  845    1492  56.6% -lh5- d48d Jan  6 11:44 ScreenTime/Source/snprintf.h
[unknown]                 1209    2713  44.6% -lh5- 8fd7 Jan  6 11:44 ScreenTime/Source/timer.c
[unknown]                  582     994  58.6% -lh5- 2e08 Jan  6 11:44 ScreenTime/Source/timer.h
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total        47 files   61464  139324  44.1%            Jan  8 03:42

Aminet © 1992-2022 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>