--- rxvt-unicode/src/perl/digital-clock 2006/01/03 04:30:31 1.6 +++ rxvt-unicode/src/perl/digital-clock 2006/01/03 20:47:36 1.7 @@ -5,13 +5,13 @@ sub on_init { my ($self) = @_; - $self->{digital_clock_overlay} = $self->overlay (-1, 0, 8, 1, urxvt::OVERLAY_RSTYLE, 0); - $self->{digital_clock_timer} = urxvt::timer + $self->{overlay} = $self->overlay (-1, 0, 8, 1, urxvt::OVERLAY_RSTYLE, 0); + $self->{timer} = urxvt::timer ->new ->start (int urxvt::NOW) # make sure we update "on" the second ->interval (1) ->cb (sub { - $self->{digital_clock_overlay}->set (0, 0, + $self->{overlay}->set (0, 0, sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]); });