Revision: | 1.3 |
Committed: | Tue Jan 3 04:18:47 2006 UTC (18 years, 5 months ago) by root |
Branch: | MAIN |
CVS Tags: | HEAD |
Changes since 1.2: | +0 -0 lines |
State: | FILE REMOVED |
Error occurred while calculating annotation data. | |
Log Message: | *** empty log message *** |
# | Content |
---|---|
1 | #! perl |
2 | |
3 | # this creates a simple clock using the overlay box. it is not very useful, because |
4 | # it makes the iso14755 mode almost useles as its box gets destroyed every second. |
5 | |
6 | use POSIX (); |
7 | |
8 | sub on_init { |
9 | my ($self) = @_; |
10 | |
11 | $self->{timer} = urxvt::timer |
12 | ->new |
13 | ->start (urxvt::NOW) |
14 | ->cb (sub { |
15 | my ($timer) = @_; |
16 | my $time = $timer->at; |
17 | $timer->start ($time + 1); |
18 | $self->scr_overlay (-1, 0, POSIX::strftime "%H:%M:%S", localtime $time); |
19 | }); |
20 | |
21 | () |
22 | } |
23 |