ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/doc/rxvtperl.3.txt
(Generate patch)

Comparing rxvt-unicode/doc/rxvtperl.3.txt (file contents):
Revision 1.39 by root, Mon Feb 6 05:55:33 2006 UTC vs.
Revision 1.43 by root, Mon Jul 17 19:20:29 2006 UTC

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:
78 URxvt.keysym.C-M-r: perl:selection:rot13 78 URxvt.keysym.C-M-r: perl:selection:rot13
79 79
80 option-popup (enabled by default) 80 option-popup (enabled by default)
81 Binds a popup menu to Ctrl-Button2 that lets you toggle (some) 81 Binds a popup menu to Ctrl-Button2 that lets you toggle (some)
82 options at runtime. 82 options at runtime.
83
84 Other extensions can extend this popup menu by pushing a code
85 reference onto "@{ $term-"{option_popup_hook} }>, which gets called
86 whenever the popup is being displayed.
87
88 It's sole argument is the popup menu, which can be modified. It
89 should either return nothing or a string, the initial boolean value
90 and a code reference. The string will be used as button text and the
91 code reference will be called when the toggle changes, with the new
92 boolean value as first argument.
93
94 The following will add an entry "myoption" that changes
95 "$self-"{myoption}>:
96
97 push @{ $self->{term}{option_popup_hook} }, sub {
98 ("my option" => $myoption, sub { $self->{myoption} = $_[0] })
99 };
83 100
84 selection-popup (enabled by default) 101 selection-popup (enabled by default)
85 Binds a popup menu to Ctrl-Button3 that lets you convert the 102 Binds a popup menu to Ctrl-Button3 that lets you convert the
86 selection text into various other formats/action (such as uri 103 selection text into various other formats/action (such as uri
87 unescaping, perl evaluation, web-browser starting etc.), depending 104 unescaping, perl evaluation, web-browser starting etc.), depending
88 on content. 105 on content.
89 106
90 Other extensions can extend this popup menu by pushing a code 107 Other extensions can extend this popup menu by pushing a code
91 reference onto "@{ $term-"{selection_popup_hook} }>, that is called 108 reference onto "@{ $term-"{selection_popup_hook} }>, which gets
92 whenever the popup is displayed. 109 called whenever the popup is being displayed.
93 110
94 It's sole argument is the popup menu, which can be modified. The 111 It's sole argument is the popup menu, which can be modified. The
95 selection is in $_, which can be used to decide wether to add 112 selection is in $_, which can be used to decide wether to add
96 something or not. It should either return nothing or a string and a 113 something or not. It should either return nothing or a string and a
97 code reference. The string will be used as button text and the code 114 code reference. The string will be used as button text and the code
119 "End" jumps to the bottom. "Escape" leaves search mode and returns 136 "End" jumps to the bottom. "Escape" leaves search mode and returns
120 to the point where search was started, while "Enter" or "Return" 137 to the point where search was started, while "Enter" or "Return"
121 stay at the current position and additionally stores the first match 138 stay at the current position and additionally stores the first match
122 in the current line into the primary selection. 139 in the current line into the primary selection.
123 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
124 readline (enabled by default) 148 readline (enabled by default)
125 A support package that tries to make editing with readline easier. 149 A support package that tries to make editing with readline easier.
126 At the moment, it reacts to clicking with the left mouse button by 150 At the moment, it reacts to clicking shift-left mouse button by
127 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
128 generating as many cursor-left or cursor-right keypresses as 152 generating as many cursor-left or cursor-right keypresses as
129 required (the this only works for programs that correctly support 153 required (the this only works for programs that correctly support
130 wide characters). 154 wide characters).
131 155
211 You enable it by specifying this extension and a preedit style of 235 You enable it by specifying this extension and a preedit style of
212 "OnTheSpot", i.e.: 236 "OnTheSpot", i.e.:
213 237
214 rxvt -pt OnTheSpot -pe xim-onthespot 238 rxvt -pt OnTheSpot -pe xim-onthespot
215 239
240 kuake<hotkey>
241 A very primitive quake-console-like extension. It was inspired by a
242 description of how the programs "kuake" and "yakuake" work: Whenever
243 the user presses a global accelerator key (by default "F10"), the
244 terminal will show or hide itself. Another press of the accelerator
245 key will hide or show it again.
246
247 Initially, the window will not be shown when using this extension.
248
249 This is useful if you need a single terminal thats not using any
250 desktop space most of the time but is quickly available at the press
251 of a key.
252
253 The accelerator key is grabbed regardless of any modifers, so this
254 extension will actually grab a physical key just for this function.
255
256 If you want a quake-like animation, tell your window manager to do
257 so (fvwm can do it).
258
216 automove-background 259 automove-background
217 This is basically a one-line extension that dynamically changes the 260 This is basically a very small extension that dynamically changes
218 background pixmap offset to the window position, in effect creating 261 the background pixmap offset to the window position, in effect
219 the same effect as pseudo transparency with a custom pixmap. No 262 creating the same effect as pseudo transparency with a custom
220 scaling is supported in this mode. Exmaple: 263 pixmap. No scaling is supported in this mode. Exmaple:
221 264
222 rxvt -pixmap background.xpm -pe automove-background 265 rxvt -pixmap background.xpm -pe automove-background
223 266
224 block-graphics-to-ascii 267 block-graphics-to-ascii
225 A not very useful example of filtering all text output to the 268 A not very useful example of filtering all text output to the
226 terminal, by replacing all line-drawing characters (U+2500 .. 269 terminal by replacing all line-drawing characters (U+2500 .. U+259F)
227 U+259F) by a similar-looking ascii character. 270 by a similar-looking ascii character.
228 271
229 digital-clock 272 digital-clock
230 Displays a digital clock using the built-in overlay. 273 Displays a digital clock using the built-in overlay.
231 274
232 remote-clipboard 275 remote-clipboard
310 $octets 353 $octets
311 Either binary data or - more common - a text string encoded in a 354 Either binary data or - more common - a text string encoded in a
312 locale-specific way. 355 locale-specific way.
313 356
314 Extension Objects 357 Extension Objects
315 Very perl extension is a perl class. A separate perl object is created 358 Every perl extension is a perl class. A separate perl object is created
316 for each terminal and each extension and passed as the first parameter 359 for each terminal and each extension and passed as the first parameter
317 to hooks. So extensions can use their $self object without having to 360 to hooks. So extensions can use their $self object without having to
318 think about other extensions, with the exception of methods and members 361 think about other extensions, with the exception of methods and members
319 that begin with an underscore character "_": these are reserved for 362 that begin with an underscore character "_": these are reserved for
320 internal use. 363 internal use.
418 461
419 It is called before lines are scrolled out (so rows 0 .. min ($lines 462 It is called before lines are scrolled out (so rows 0 .. min ($lines
420 - 1, $nrow - 1) represent the lines to be scrolled out). $saved is 463 - 1, $nrow - 1) represent the lines to be scrolled out). $saved is
421 the total number of lines that will be in the scrollback buffer. 464 the total number of lines that will be in the scrollback buffer.
422 465
466 on_osc_seq $term, $op, $args
467 Called on every OSC sequence and can be used to suppress it or
468 modify its behaviour. The default should be to return an empty list.
469 A true value suppresses execution of the request completely. Make
470 sure you don't get confused by recursive invocations when you output
471 an osc sequence within this callback.
472
473 "on_osc_seq_perl" should be used for new behaviour.
474
423 on_osc_seq $term, $string 475 on_osc_seq_perl $term, $string
424 Called whenever the ESC ] 777 ; string ST command sequence (OSC = 476 Called whenever the ESC ] 777 ; string ST command sequence (OSC =
425 operating system command) is processed. Cursor position and other 477 operating system command) is processed. Cursor position and other
426 state information is up-to-date when this happens. For 478 state information is up-to-date when this happens. For
427 interoperability, the string should start with the extension name 479 interoperability, the string should start with the extension name
428 and a colon, to distinguish it from commands for other extensions, 480 and a colon, to distinguish it from commands for other extensions,
472 keysym resource in the rxvt(1) manpage). 524 keysym resource in the rxvt(1) manpage).
473 525
474 The event is simply the action string. This interface is assumed to 526 The event is simply the action string. This interface is assumed to
475 change slightly in the future. 527 change slightly in the future.
476 528
529 on_resize_all_windows $tern, $new_width, $new_height
530 Called just after the new window size has been calculcated, but
531 before windows are actually being resized or hints are being set. If
532 this hook returns TRUE, setting of the window hints is being
533 skipped.
534
477 on_x_event $term, $event 535 on_x_event $term, $event
478 Called on every X event received on the vt window (and possibly 536 Called on every X event received on the vt window (and possibly
479 other windows). Should only be used as a last resort. Most event 537 other windows). Should only be used as a last resort. Most event
480 structure members are not passed. 538 structure members are not passed.
539
540 on_root_event $term, $event
541 Like "on_x_event", but is called for events on the root window.
481 542
482 on_focus_in $term 543 on_focus_in $term
483 Called whenever the window gets the keyboard focus, before 544 Called whenever the window gets the keyboard focus, before
484 rxvt-unicode does focus in processing. 545 rxvt-unicode does focus in processing.
485 546
903 964
904 $env = $term->env 965 $env = $term->env
905 Returns a copy of the environment in effect for the terminal as a 966 Returns a copy of the environment in effect for the terminal as a
906 hashref similar to "\%ENV". 967 hashref similar to "\%ENV".
907 968
969 @envv = $term->envv
970 Returns the environment as array of strings of the form "VAR=VALUE".
971
972 @argv = $term->argv
973 Return the argument vector as this terminal, similar to @ARGV, but
974 includes the program name as first element.
975
908 $modifiermask = $term->ModLevel3Mask 976 $modifiermask = $term->ModLevel3Mask
909 $modifiermask = $term->ModMetaMask 977 $modifiermask = $term->ModMetaMask
910 $modifiermask = $term->ModNumLockMask 978 $modifiermask = $term->ModNumLockMask
911 Return the modifier masks corresponding to the "ISO Level 3 Shift" 979 Return the modifier masks corresponding to the "ISO Level 3 Shift"
912 (often AltGr), the meta key (often Alt) and the num lock key, if 980 (often AltGr), the meta key (often Alt) and the num lock key, if
1067 1135
1068 $popup->add_button ($text, $cb) 1136 $popup->add_button ($text, $cb)
1069 Adds a clickable button to the popup. $cb is called whenever it is 1137 Adds a clickable button to the popup. $cb is called whenever it is
1070 selected. 1138 selected.
1071 1139
1072 $popup->add_toggle ($text, $cb, $initial_value) 1140 $popup->add_toggle ($text, $initial_value, $cb)
1073 Adds a toggle/checkbox item to the popup. Teh callback gets called 1141 Adds a toggle/checkbox item to the popup. The callback gets called
1074 whenever it gets toggled, with a boolean indicating its value as its 1142 whenever it gets toggled, with a boolean indicating its new value as
1075 first argument. 1143 its first argument.
1076 1144
1077 $popup->show 1145 $popup->show
1078 Displays the popup (which is initially hidden). 1146 Displays the popup (which is initially hidden).
1079 1147
1080 The "urxvt::timer" Class 1148 The "urxvt::timer" Class
1086 ->new 1154 ->new
1087 ->interval (1) 1155 ->interval (1)
1088 ->cb (sub { 1156 ->cb (sub {
1089 $term->{overlay}->set (0, 0, 1157 $term->{overlay}->set (0, 0,
1090 sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]); 1158 sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]);
1091 }); 1159 });
1092 1160
1093 $timer = new urxvt::timer 1161 $timer = new urxvt::timer
1094 Create a new timer object in started state. It is scheduled to fire 1162 Create a new timer object in started state. It is scheduled to fire
1095 immediately. 1163 immediately.
1096 1164
1184 ->new 1252 ->new
1185 ->start ($pid) 1253 ->start ($pid)
1186 ->cb (sub { 1254 ->cb (sub {
1187 my ($pw, $exit_status) = @_; 1255 my ($pw, $exit_status) = @_;
1188 ... 1256 ...
1189 }); 1257 });
1190 1258
1191 $pw = new urxvt::pw 1259 $pw = new urxvt::pw
1192 Create a new process watcher in stopped state. 1260 Create a new process watcher in stopped state.
1193 1261
1194 $pw = $pw->cb (sub { my ($pw, $exit_status) = @_; ... }) 1262 $pw = $pw->cb (sub { my ($pw, $exit_status) = @_; ... })

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines