Revision: | 1.5 |
Committed: | Tue Jan 3 04:18:47 2006 UTC (18 years, 6 months ago) by root |
Branch: | MAIN |
Changes since 1.4: | +6 -35 lines |
Log Message: | *** empty log message *** |
# | User | Rev | Content |
---|---|---|---|
1 | root | 1.1 | #! perl |
2 | |||
3 | root | 1.5 | # this creates a simple digital clock |
4 | root | 1.1 | |
5 | sub on_init { | ||
6 | my ($self) = @_; | ||
7 | |||
8 | root | 1.5 | $self->{digital_clock_overlay} = $self->overlay (-1, 0, 8, 1, urxvt::OVERLAY_RSTYLE, 0); |
9 | $self->{digital_clock_timer} = urxvt::timer | ||
10 | root | 1.1 | ->new |
11 | root | 1.5 | ->interval (1) |
12 | root | 1.1 | ->cb (sub { |
13 | root | 1.5 | $self->{digital_clock_overlay}->set (0, 0, |
14 | sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]); | ||
15 | root | 1.1 | }); |
16 | |||
17 | () | ||
18 | } | ||
19 | |||
20 |