… | |
… | |
63 | Another example: Programs I use often output "absolute path: " at |
63 | Another example: Programs I use often output "absolute path: " at |
64 | the beginning of a line when they process multiple files. The |
64 | the beginning of a line when they process multiple files. The |
65 | following pattern matches the filename (note, there is a single |
65 | following pattern matches the filename (note, there is a single |
66 | space at the very end): |
66 | space at the very end): |
67 | |
67 | |
68 | URxvt.selection.pattern-0: ^(/[^:]+):\ |
68 | URxvt.selection.pattern-0: ^(/[^:]+):\ |
69 | |
69 | |
70 | You can look at the source of the selection extension to see more |
70 | You can look at the source of the selection extension to see more |
71 | interesting uses, such as parsing a line from beginning to end. |
71 | interesting uses, such as parsing a line from beginning to end. |
72 | |
72 | |
73 | This extension also offers following bindable keyboard commands: |
73 | This extension also offers following bindable keyboard commands: |
… | |
… | |
136 | "End" jumps to the bottom. "Escape" leaves search mode and returns |
136 | "End" jumps to the bottom. "Escape" leaves search mode and returns |
137 | to the point where search was started, while "Enter" or "Return" |
137 | to the point where search was started, while "Enter" or "Return" |
138 | stay at the current position and additionally stores the first match |
138 | stay at the current position and additionally stores the first match |
139 | in the current line into the primary selection. |
139 | in the current line into the primary selection. |
140 | |
140 | |
|
|
141 | The regex defaults to "(?i)", resulting in a case-insensitive |
|
|
142 | search. To get a case-sensitive search you can delete this prefix |
|
|
143 | using "BackSpace" or simply use an uppercase character which removes |
|
|
144 | the "(?i)" prefix. |
|
|
145 | |
|
|
146 | See perlre for more info about perl regular expression syntax. |
|
|
147 | |
141 | readline (enabled by default) |
148 | readline (enabled by default) |
142 | A support package that tries to make editing with readline easier. |
149 | A support package that tries to make editing with readline easier. |
143 | At the moment, it reacts to clicking shift-left mouse button by |
150 | At the moment, it reacts to clicking shift-left mouse button by |
144 | trying to move the text cursor to this position. It does so by |
151 | trying to move the text cursor to this position. It does so by |
145 | generating as many cursor-left or cursor-right keypresses as |
152 | generating as many cursor-left or cursor-right keypresses as |
… | |
… | |
229 | "OnTheSpot", i.e.: |
236 | "OnTheSpot", i.e.: |
230 | |
237 | |
231 | rxvt -pt OnTheSpot -pe xim-onthespot |
238 | rxvt -pt OnTheSpot -pe xim-onthespot |
232 | |
239 | |
233 | automove-background |
240 | automove-background |
234 | This is basically a one-line extension that dynamically changes the |
241 | This is basically a very small extension that dynamically changes |
235 | background pixmap offset to the window position, in effect creating |
242 | the background pixmap offset to the window position, in effect |
236 | the same effect as pseudo transparency with a custom pixmap. No |
243 | creating the same effect as pseudo transparency with a custom |
237 | scaling is supported in this mode. Exmaple: |
244 | pixmap. No scaling is supported in this mode. Exmaple: |
238 | |
245 | |
239 | rxvt -pixmap background.xpm -pe automove-background |
246 | rxvt -pixmap background.xpm -pe automove-background |
240 | |
247 | |
241 | block-graphics-to-ascii |
248 | block-graphics-to-ascii |
242 | A not very useful example of filtering all text output to the |
249 | A not very useful example of filtering all text output to the |
243 | terminal, by replacing all line-drawing characters (U+2500 .. |
250 | terminal by replacing all line-drawing characters (U+2500 .. U+259F) |
244 | U+259F) by a similar-looking ascii character. |
251 | by a similar-looking ascii character. |
245 | |
252 | |
246 | digital-clock |
253 | digital-clock |
247 | Displays a digital clock using the built-in overlay. |
254 | Displays a digital clock using the built-in overlay. |
248 | |
255 | |
249 | remote-clipboard |
256 | remote-clipboard |
… | |
… | |
327 | $octets |
334 | $octets |
328 | Either binary data or - more common - a text string encoded in a |
335 | Either binary data or - more common - a text string encoded in a |
329 | locale-specific way. |
336 | locale-specific way. |
330 | |
337 | |
331 | Extension Objects |
338 | Extension Objects |
332 | Very perl extension is a perl class. A separate perl object is created |
339 | Every perl extension is a perl class. A separate perl object is created |
333 | for each terminal and each extension and passed as the first parameter |
340 | for each terminal and each extension and passed as the first parameter |
334 | to hooks. So extensions can use their $self object without having to |
341 | to hooks. So extensions can use their $self object without having to |
335 | think about other extensions, with the exception of methods and members |
342 | think about other extensions, with the exception of methods and members |
336 | that begin with an underscore character "_": these are reserved for |
343 | that begin with an underscore character "_": these are reserved for |
337 | internal use. |
344 | internal use. |
… | |
… | |
435 | |
442 | |
436 | It is called before lines are scrolled out (so rows 0 .. min ($lines |
443 | It is called before lines are scrolled out (so rows 0 .. min ($lines |
437 | - 1, $nrow - 1) represent the lines to be scrolled out). $saved is |
444 | - 1, $nrow - 1) represent the lines to be scrolled out). $saved is |
438 | the total number of lines that will be in the scrollback buffer. |
445 | the total number of lines that will be in the scrollback buffer. |
439 | |
446 | |
|
|
447 | on_osc_seq $term, $op, $args |
|
|
448 | Called on every OSC sequence and can be used to suppress it or |
|
|
449 | modify its behaviour. The default should be to return an empty list. |
|
|
450 | A true value suppresses execution of the request completely. Make |
|
|
451 | sure you don't get confused by recursive invocations when you output |
|
|
452 | an osc sequence within this callback. |
|
|
453 | |
|
|
454 | "on_osc_seq_perl" should be used for new behaviour. |
|
|
455 | |
440 | on_osc_seq $term, $string |
456 | on_osc_seq_perl $term, $string |
441 | Called whenever the ESC ] 777 ; string ST command sequence (OSC = |
457 | Called whenever the ESC ] 777 ; string ST command sequence (OSC = |
442 | operating system command) is processed. Cursor position and other |
458 | operating system command) is processed. Cursor position and other |
443 | state information is up-to-date when this happens. For |
459 | state information is up-to-date when this happens. For |
444 | interoperability, the string should start with the extension name |
460 | interoperability, the string should start with the extension name |
445 | and a colon, to distinguish it from commands for other extensions, |
461 | and a colon, to distinguish it from commands for other extensions, |
… | |
… | |
1116 | ->new |
1132 | ->new |
1117 | ->interval (1) |
1133 | ->interval (1) |
1118 | ->cb (sub { |
1134 | ->cb (sub { |
1119 | $term->{overlay}->set (0, 0, |
1135 | $term->{overlay}->set (0, 0, |
1120 | sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]); |
1136 | sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]); |
1121 | }); |
1137 | }); |
1122 | |
1138 | |
1123 | $timer = new urxvt::timer |
1139 | $timer = new urxvt::timer |
1124 | Create a new timer object in started state. It is scheduled to fire |
1140 | Create a new timer object in started state. It is scheduled to fire |
1125 | immediately. |
1141 | immediately. |
1126 | |
1142 | |
… | |
… | |
1214 | ->new |
1230 | ->new |
1215 | ->start ($pid) |
1231 | ->start ($pid) |
1216 | ->cb (sub { |
1232 | ->cb (sub { |
1217 | my ($pw, $exit_status) = @_; |
1233 | my ($pw, $exit_status) = @_; |
1218 | ... |
1234 | ... |
1219 | }); |
1235 | }); |
1220 | |
1236 | |
1221 | $pw = new urxvt::pw |
1237 | $pw = new urxvt::pw |
1222 | Create a new process watcher in stopped state. |
1238 | Create a new process watcher in stopped state. |
1223 | |
1239 | |
1224 | $pw = $pw->cb (sub { my ($pw, $exit_status) = @_; ... }) |
1240 | $pw = $pw->cb (sub { my ($pw, $exit_status) = @_; ... }) |