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

util/time/ScreenTime.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
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.2.1
Architecture:m68k-amigaos >= 2.0
Date:2020-01-24
Download:http://aminet.net/util/time/ScreenTime.lha - View contents
Readme:http://aminet.net/util/time/ScreenTime.readme
Downloads:530
New in version 1.2.1:

- Tried to make the calendar layout routines more compatible
  certain patches or versions of the AmigaOS that mess with
  window title bars and cause problems when precalculating
  the size of windows without 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.


ScreenTime is a commodity that will display the current time
on any public screen. If no particular screen is specified,
it will open on the default public screen (usually the Work-
bench). By default, ScreenTime will open a small borderless
window on top of the screen bar, adopting the font and col-
ors of the screen to make it look like it's part of it, but
if you want, you can override the position, font or colors
using tool types or Shell arguments.

Clicking the clock will bring up a calendar for the current
month. 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 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.

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.

You specify the desired format using the FORMAT tool type or
Shell argument. There are six different locale-defined for-
mats 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 possible commands 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.

Finally, 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 imi-
tate the screen bar, the latter being the default behavior.

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

Thank you to the people who give me feedback and help me im-
prove ScreenTime, and to Stefan Haubenthal for the German
translation!


History:

1.2.1 (Jan 24, 2020):

- Tried to make the calendar layout routines more compatible
  certain patches or versions of the AmigaOS that mess with
  window title bars and cause problems when precalculating
  the size of windows without 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
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[Amiga]                    252     628  40.1% -lh5- 2c51 Jan 24 23:14 ScreenTime.info
[Amiga]                    154     200  77.0% -lh5- 2532 Jan 24 23:14 ScreenTime/Catalogs/dansk/screentime.catalog
[Amiga]                    160     214  74.8% -lh5- 3ba4 Jan 24 23:14 ScreenTime/Catalogs/deutsch/screentime.catalog
[Amiga]                    215     290  74.1% -lh5- e397 Jan 24 23:14 ScreenTime/Catalogs/italiano/screentime.catalog
[Amiga]                  12641   35147  36.0% -lh5- 7994 Jan 24 23:14 ScreenTime/gpl-3.0.txt
[Amiga]                    249     477  52.2% -lh5- 4273 Jan 24 23:14 ScreenTime/gpl-3.0.txt.info
[Amiga]                   2617    6403  40.9% -lh5- 2a10 Jan 24 23:14 ScreenTime/Readme
[Amiga]                    246     477  51.6% -lh5- 7f30 Jan 24 23:14 ScreenTime/ReadMe.info
[Amiga]                   7122   10836  65.7% -lh5- 335d Jan 24 23:14 ScreenTime/ScreenTime
[Amiga]                    365     733  49.8% -lh5- d328 Jan 24 23:14 ScreenTime/ScreenTime.info
[Amiga]                   1321    1321 100.0% -lh0- 598e Jan 24 23:15 ScreenTime/ScreenTime_ITA.lha
[Amiga]                   1536    4285  35.8% -lh5- d645 Jan 24 23:14 ScreenTime/Source/args.c
[Amiga]                    669    1104  60.6% -lh5- c317 Jan 24 23:14 ScreenTime/Source/args.h
[Amiga]                   1339    3021  44.3% -lh5- e64a Jan 24 23:14 ScreenTime/Source/broker.c
[Amiga]                    567     936  60.6% -lh5- 7870 Jan 24 23:14 ScreenTime/Source/broker.h
[Amiga]                    853    1599  53.3% -lh5- f428 Jan 24 23:14 ScreenTime/Source/catalog.c
[Amiga]                    575     940  61.2% -lh5- e3d4 Jan 24 23:14 ScreenTime/Source/catalog.h
[Amiga]                    648    1088  59.6% -lh5- 62dd Jan 24 23:14 ScreenTime/Source/common.c
[Amiga]                    656    1113  58.9% -lh5- d61c Jan 24 23:14 ScreenTime/Source/common.h
[Amiga]                    569     926  61.4% -lh5- 31ba Jan 24 23:14 ScreenTime/Source/compiler.h
[Amiga]                    673    1285  52.4% -lh5- 2bba Jan 24 23:14 ScreenTime/Source/cx.c
[Amiga]                    533     880  60.6% -lh5- 1d1a Jan 24 23:14 ScreenTime/Source/cx.h
[Amiga]                    209     252  82.9% -lh5- e1a4 Jan 24 23:15 ScreenTime/Source/dansk.ct
[Amiga]                   1831    4662  39.3% -lh5- b655 Jan 24 23:14 ScreenTime/Source/datetime.c
[Amiga]                    840    1540  54.5% -lh5- 9837 Jan 24 23:14 ScreenTime/Source/datetime.h
[Amiga]                    212     263  80.6% -lh5- d88a Jan 24 23:15 ScreenTime/Source/deutsch.ct
[Amiga]                   3885   12629  30.8% -lh5- e3d2 Jan 24 23:14 ScreenTime/Source/display.c
[Amiga]                    598    1039  57.6% -lh5- db49 Jan 24 23:14 ScreenTime/Source/display.h
[Amiga]                    929    1826  50.9% -lh5- 2186 Jan 24 23:14 ScreenTime/Source/error.c
[Amiga]                    714    1195  59.7% -lh5- 57b7 Jan 24 23:14 ScreenTime/Source/error.h
[Amiga]                   1433    3720  38.5% -lh5- c2bb Jan 24 23:14 ScreenTime/Source/main.c
[Amiga]                    530     853  62.1% -lh5- fd43 Jan 24 23:14 ScreenTime/Source/main.h
[Amiga]                    215     290  74.1% -lh5- e397 Jan 24 23:14 ScreenTime/Source/Resources/Catalogs/italiano/ScreenTime.catalog
[Amiga]                    366     733  49.9% -lh5- 93b1 Jan 24 23:14 ScreenTime/Source/Resources/ScreenTime.info
[Amiga]                    104     139  74.8% -lh5- 3734 Jan 24 23:14 ScreenTime/Source/SCOPTIONS
[Amiga]                    569     933  61.0% -lh5- 971c Jan 24 23:14 ScreenTime/Source/screentime.cd
[Amiga]                    757    2120  35.7% -lh5- b651 Jan 24 23:14 ScreenTime/Source/smakefile
[Amiga]                    893    1683  53.1% -lh5- 8f94 Jan 24 23:14 ScreenTime/Source/snprintf.c
[Amiga]                    851    1497  56.8% -lh5- afb8 Jan 24 23:14 ScreenTime/Source/snprintf.h
[Amiga]                   1192    2659  44.8% -lh5- 5ab9 Jan 24 23:14 ScreenTime/Source/timer.c
[Amiga]                    596    1026  58.1% -lh5- 6895 Jan 24 23:14 ScreenTime/Source/timer.h
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        41 files   50684  112962  44.9%            Jan 24 20:27

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