1 | #! perl |
1 | #! perl |
2 | |
2 | |
3 | #:META:X_RESOURCE:%.expr:string:background expression |
3 | #:META:RESOURCE:%.expr:string:background expression |
4 | #:META:X_RESOURCE:%.border:boolean:respect the terminal border |
4 | #:META:RESOURCE:%.border:boolean:respect the terminal border |
5 | #:META:X_RESOURCE:%.interval:seconds:minimum time between updates |
5 | #:META:RESOURCE:%.interval:seconds:minimum time between updates |
6 | |
6 | |
7 | =head1 NAME |
7 | =head1 NAME |
8 | |
8 | |
9 | background - manage terminal background |
9 | background - manage terminal background |
10 | |
10 | |
… | |
… | |
958 | =item focus_fade $factor, $color, $img |
958 | =item focus_fade $factor, $color, $img |
959 | |
959 | |
960 | Fades the image by the given factor (and colour) when focus is lost (the |
960 | Fades the image by the given factor (and colour) when focus is lost (the |
961 | same as the C<-fade>/C<-fadecolor> command line options, which also supply |
961 | same as the C<-fade>/C<-fadecolor> command line options, which also supply |
962 | the default values for C<factor> and C<$color>. Unlike with C<-fade>, the |
962 | the default values for C<factor> and C<$color>. Unlike with C<-fade>, the |
963 | C<$factor> is the real value, not a percentage value (that is, 0..1, not |
963 | C<$factor> is a real value, not a percentage value (that is, 0..1, not |
964 | 0..100). |
964 | 0..100). |
965 | |
965 | |
966 | Example: do the right thing when focus fading is requested. |
966 | Example: do the right thing when focus fading is requested. |
967 | |
967 | |
968 | focus_fade load "mybg.jpg"; |
968 | focus_fade load "mybg.jpg"; |
… | |
… | |
1186 | # } |
1186 | # } |
1187 | |
1187 | |
1188 | # set background pixmap |
1188 | # set background pixmap |
1189 | |
1189 | |
1190 | $self->set_background ($img, $self->{border}); |
1190 | $self->set_background ($img, $self->{border}); |
1191 | $self->scr_recolour (0); |
1191 | $self->scr_recolor (0); |
1192 | $self->want_refresh; |
1192 | $self->want_refresh; |
1193 | } |
1193 | } |
1194 | |
1194 | |
1195 | sub on_start { |
1195 | sub on_start { |
1196 | my ($self) = @_; |
1196 | my ($self) = @_; |