gtk2-ex-clock.pl -- simple digital clock program
gtk2-ex-clock.pl [--options]
This is a little program displaying a digital clock using Gtk2::Ex::Clock, and optionally DateTime::TimeZone.
Gtk2::Ex::Clock
DateTime::TimeZone
This is only meant as a bit of fun with the clock widget, since running up the whole of Perl-Gtk2 uses much more memory than you'd like from a clock program. Adding a clock widget to a Perl-Gtk2 application doesn't cost much extra, but running it standalone is a little wasteful.
Button-1 drags the clock around (as might any key/button combination the window manager also offers for that). Button-3 pops up a menu to quit. On a two-button mouse button-3 is usually the right hand button.
strftime format string for the display. See man strftime or man date for possible formats. The default is "%H:%M" for hours and minutes.
strftime
man strftime
man date
gtk2-ex-clock.pl --format="%I:%M %P"
Timezone to display (default local time per TZ environment variable or system default).
Timezone to display, using a given named DateTime::TimeZone zone (requires DateTime and DateTime::TimeZone installed).
DateTime
Print the available DateTime::TimeZone zone names.
Set the resolution in seconds of the --format string, as per the Gtk2::Ex::Clock resolution property. Usually Gtk2::Ex::Clock gets the right resolution from the format string.
--format
resolution
Set the foreground and background colours. The colours can be names from the X RGB database (/etc/X11/rgb.txt), or hex style #RRGGBB. For example white on a shade of red,
gtk2-ex-clock.pl --foreground=white --background=#A01010
Set the size and position of the clock window. See man X on geometry specification strings. For example to start at the top-right of the screen, leaving the size to the clock's default.
man X
gtk2-ex-clock.pl --geomentry=-0+0
Print a summary of the options.
Print program version.
Standard Gtk options. See man gtk-options for the full list. The only one which does much for gtk2-ex-clock.pl is --display to set the X display (default from the DISPLAY environment variable).
man gtk-options
gtk2-ex-clock.pl
--display
DISPLAY
Gtk2::Ex::Clock, strftime(3), DateTime::TimeZone, Gtk2::Ex::NoShrink, gtk-options
strftime(3)
gtk-options
http://user42.tuxfamily.org/gtk2-ex-clock/index.html
Gtk2-Ex-Clock is Copyright 2007, 2008, 2009, 2010, 2011 Kevin Ryde
Gtk2-Ex-Clock is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Gtk2-Ex-Clock is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Gtk2-Ex-Clock. If not, see http://www.gnu.org/licenses/.
To install Gtk2::Ex::Clock, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gtk2::Ex::Clock
CPAN shell
perl -MCPAN -e shell install Gtk2::Ex::Clock
For more information on module installation, please visit the detailed CPAN module installation guide.