ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/background
(Generate patch)

Comparing rxvt-unicode/src/perl/background (file contents):
Revision 1.72 by root, Mon Jul 2 02:01:41 2012 UTC vs.
Revision 1.73 by sf-exg, Thu Jul 5 20:05:19 2012 UTC

74 return load "$HOME/sunday.png"; 74 return load "$HOME/sunday.png";
75 } 75 }
76 } 76 }
77 77
78This inner expression is evaluated once per hour (and whenever the 78This inner expression is evaluated once per hour (and whenever the
79temrinal window is resized). It sets F<sunday.png> as background on 79terminal window is resized). It sets F<sunday.png> as background on
80Sundays, and F<weekday.png> on all other days. 80Sundays, and F<weekday.png> on all other days.
81 81
82Fortunately, we expect that most expressions will be much simpler, with 82Fortunately, we expect that most expressions will be much simpler, with
83little Perl knowledge needed. 83little Perl knowledge needed.
84 84
119width and doubles the image height: 119width and doubles the image height:
120 120
121 scale 0.5, 2, load "$HOME/mypic.png" 121 scale 0.5, 2, load "$HOME/mypic.png"
122 122
123IF you try out these expressions, you might suffer from some sluggishness, 123IF you try out these expressions, you might suffer from some sluggishness,
124because each time the terminal is resized, it loads the PNG image agin 124because each time the terminal is resized, it loads the PNG image again
125and scales it. Scaling is usually fast (and unavoidable), but loading the 125and scales it. Scaling is usually fast (and unavoidable), but loading the
126image can be quite time consuming. This is where C<keep> comes in handy: 126image can be quite time consuming. This is where C<keep> comes in handy:
127 127
128 scale 0.5, 2, keep { load "$HOME/mypic.png" } 128 scale 0.5, 2, keep { load "$HOME/mypic.png" }
129 129
159left corner of the terminal window)- the result is pseudo-transparency: 159left corner of the terminal window)- the result is pseudo-transparency:
160the image seems to be static while the window is moved around. 160the image seems to be static while the window is moved around.
161 161
162=head2 COLOUR SPECIFICATIONS 162=head2 COLOUR SPECIFICATIONS
163 163
164Whenever an oprator expects a "colour", then this can be specified in one 164Whenever an operator expects a "colour", then this can be specified in one
165of two ways: Either as string with an X11 colour specification, such as: 165of two ways: Either as string with an X11 colour specification, such as:
166 166
167 "red" # named colour 167 "red" # named colour
168 "#f00" # simple rgb 168 "#f00" # simple rgb
169 "[50]red" # red with 50% alpha 169 "[50]red" # red with 50% alpha
905C<keep> block so it only is reevaluated as required. 905C<keep> block so it only is reevaluated as required.
906 906
907Putting the blur into a C<keep> block will make sure the blur is only done 907Putting the blur into a C<keep> block will make sure the blur is only done
908once, while the C<rootalign> is still done each time the window moves. 908once, while the C<rootalign> is still done each time the window moves.
909 909
910 rootlign keep { blur 10, root } 910 rootalign keep { blur 10, root }
911 911
912This leaves the question of how to force reevaluation of the block, 912This leaves the question of how to force reevaluation of the block,
913in case the root background changes: If expression inside the block 913in case the root background changes: If expression inside the block
914is sensitive to some event (root background changes, window geometry 914is sensitive to some event (root background changes, window geometry
915changes), then it will be reevaluated automatically as needed. 915changes), then it will be reevaluated automatically as needed.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines