… | |
… | |
4 | #:META:X_RESOURCE:%.border:boolean:respect the terminal border |
4 | #:META:X_RESOURCE:%.border:boolean:respect the terminal border |
5 | #:META:X_RESOURCE:%.interval:seconds:minimum time between updates |
5 | #:META:X_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 | |
11 | =head1 SYNOPSIS |
11 | =head1 SYNOPSIS |
12 | |
12 | |
13 | urxvt --background-expr 'background expression' |
13 | urxvt --background-expr 'background expression' |
14 | --background-border |
14 | --background-border |
… | |
… | |
535 | |
535 | |
536 | move -TX, -TY, keep { load "mybg.png" } |
536 | move -TX, -TY, keep { load "mybg.png" } |
537 | |
537 | |
538 | =item TW |
538 | =item TW |
539 | |
539 | |
|
|
540 | =item TH |
|
|
541 | |
540 | Return the width (C<TW>) and height (C<TH>) of the terminal window (the |
542 | Return the width (C<TW>) and height (C<TH>) of the terminal window (the |
541 | terminal window is the full window by default, and the character area only |
543 | terminal window is the full window by default, and the character area only |
542 | when in border-respect mode). |
544 | when in border-respect mode). |
543 | |
545 | |
544 | Using these functions make your expression sensitive to window resizes. |
546 | Using these functions make your expression sensitive to window resizes. |
… | |
… | |
611 | Clips an image to the given rectangle. If the rectangle is outside the |
613 | Clips an image to the given rectangle. If the rectangle is outside the |
612 | image area (e.g. when C<$x> or C<$y> are negative) or the rectangle is |
614 | image area (e.g. when C<$x> or C<$y> are negative) or the rectangle is |
613 | larger than the image, then the tiling mode defines how the extra pixels |
615 | larger than the image, then the tiling mode defines how the extra pixels |
614 | will be filled. |
616 | will be filled. |
615 | |
617 | |
616 | If C<$x> an C<$y> are missing, then C<0> is assumed for both. |
618 | If C<$x> and C<$y> are missing, then C<0> is assumed for both. |
617 | |
619 | |
618 | If C<$width> and C<$height> are missing, then the window size will be |
620 | If C<$width> and C<$height> are missing, then the window size will be |
619 | assumed. |
621 | assumed. |
620 | |
622 | |
621 | Example: load an image, blur it, and clip it to the window size to save |
623 | Example: load an image, blur it, and clip it to the window size to save |
… | |
… | |
639 | =item scale $width_factor, $height_factor, $img |
641 | =item scale $width_factor, $height_factor, $img |
640 | |
642 | |
641 | Scales the image by the given factors in horizontal |
643 | Scales the image by the given factors in horizontal |
642 | (C<$width>) and vertical (C<$height>) direction. |
644 | (C<$width>) and vertical (C<$height>) direction. |
643 | |
645 | |
644 | If only one factor is give, it is used for both directions. |
646 | If only one factor is given, it is used for both directions. |
645 | |
647 | |
646 | If no factors are given, scales the image to the window size without |
648 | If no factors are given, scales the image to the window size without |
647 | keeping aspect. |
649 | keeping aspect. |
648 | |
650 | |
649 | =item resize $width, $height, $img |
651 | =item resize $width, $height, $img |
… | |
… | |
774 | =item rotate $center_x, $center_y, $degrees, $img |
776 | =item rotate $center_x, $center_y, $degrees, $img |
775 | |
777 | |
776 | Rotates the image clockwise by C<$degrees> degrees, around the point at |
778 | Rotates the image clockwise by C<$degrees> degrees, around the point at |
777 | C<$center_x> and C<$center_y> (specified as factor of image width/height). |
779 | C<$center_x> and C<$center_y> (specified as factor of image width/height). |
778 | |
780 | |
779 | Example: rotate the image by 90 degrees around it's center. |
781 | Example: rotate the image by 90 degrees around its center. |
780 | |
782 | |
781 | rotate 0.5, 0.5, 90, keep { load "$HOME/mybg.png" } |
783 | rotate 0.5, 0.5, 90, keep { load "$HOME/mybg.png" } |
782 | |
784 | |
783 | =cut |
785 | =cut |
784 | |
786 | |
… | |
… | |
883 | $img |
885 | $img |
884 | } |
886 | } |
885 | |
887 | |
886 | =item muladd $mul, $add, $img # EXPERIMENTAL |
888 | =item muladd $mul, $add, $img # EXPERIMENTAL |
887 | |
889 | |
888 | First multipliesthe pixels by C<$mul>, then adds C<$add>. This cna be used |
890 | First multiplies the pixels by C<$mul>, then adds C<$add>. This can be used |
889 | to implement brightness and contrast at the same time, with a wider value |
891 | to implement brightness and contrast at the same time, with a wider value |
890 | range than contrast and brightness operators. |
892 | range than contrast and brightness operators. |
891 | |
893 | |
892 | Due to numerous bugs in XRender implementations, it can also introduce a |
894 | Due to numerous bugs in XRender implementations, it can also introduce a |
893 | number of visual artifacts. |
895 | number of visual artifacts. |