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.38 by root, Sun Jan 29 21:45:47 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
183 207
184 Clicking a button will activate that tab. Pressing Shift-Left and 208 Clicking a button will activate that tab. Pressing Shift-Left and
185 Shift-Right will switch to the tab left or right of the current one, 209 Shift-Right will switch to the tab left or right of the current one,
186 while Shift-Down creates a new tab. 210 while Shift-Down creates a new tab.
187 211
212 The tabbar itself can be configured similarly to a normal terminal,
213 but with a resource class of "URxvt.tabbed". In addition, it
214 supports the following four resources (shown with defaults):
215
216 URxvt.tabbed.tabbar-fg: <colour-index, default 3>
217 URxvt.tabbed.tabbar-bg: <colour-index, default 0>
218 URxvt.tabbed.tab-fg: <colour-index, default 0>
219 URxvt.tabbed.tab-bg: <colour-index, default 1>
220
221 See *COLOR AND GRAPHICS* in the rxvt(1) manpage for valid indices.
222
188 mark-urls 223 mark-urls
189 Uses per-line display filtering ("on_line_update") to underline urls 224 Uses per-line display filtering ("on_line_update") to underline urls
190 and make them clickable. When middle-clicked, the program specified 225 and make them clickable. When middle-clicked, the program specified
191 in the resource "urlLauncher" (default "x-www-browser") will be 226 in the resource "urlLauncher" (default "x-www-browser") will be
192 started with the URL as first argument. 227 started with the URL as first argument.
200 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
201 "OnTheSpot", i.e.: 236 "OnTheSpot", i.e.:
202 237
203 rxvt -pt OnTheSpot -pe xim-onthespot 238 rxvt -pt OnTheSpot -pe xim-onthespot
204 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
205 automove-background 259 automove-background
206 This is basically a one-line extension that dynamically changes the 260 This is basically a very small extension that dynamically changes
207 background pixmap offset to the window position, in effect creating 261 the background pixmap offset to the window position, in effect
208 the same effect as pseudo transparency with a custom pixmap. No 262 creating the same effect as pseudo transparency with a custom
209 scaling is supported in this mode. Exmaple: 263 pixmap. No scaling is supported in this mode. Exmaple:
210 264
211 rxvt -pixmap background.xpm -pe automove-background 265 rxvt -pixmap background.xpm -pe automove-background
212 266
213 block-graphics-to-ascii 267 block-graphics-to-ascii
214 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
215 terminal, by replacing all line-drawing characters (U+2500 .. 269 terminal by replacing all line-drawing characters (U+2500 .. U+259F)
216 U+259F) by a similar-looking ascii character. 270 by a similar-looking ascii character.
217 271
218 digital-clock 272 digital-clock
219 Displays a digital clock using the built-in overlay. 273 Displays a digital clock using the built-in overlay.
220 274
221 remote-clipboard 275 remote-clipboard
299 $octets 353 $octets
300 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
301 locale-specific way. 355 locale-specific way.
302 356
303 Extension Objects 357 Extension Objects
304 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
305 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
306 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
307 think about other extensions, with the exception of methods and members 361 think about other extensions, with the exception of methods and members
308 that begin with an underscore character "_": these are reserved for 362 that begin with an underscore character "_": these are reserved for
309 internal use. 363 internal use.
407 461
408 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
409 - 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
410 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.
411 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
412 on_osc_seq $term, $string 475 on_osc_seq_perl $term, $string
413 Called whenever the ESC ] 777 ; string ST command sequence (OSC = 476 Called whenever the ESC ] 777 ; string ST command sequence (OSC =
414 operating system command) is processed. Cursor position and other 477 operating system command) is processed. Cursor position and other
415 state information is up-to-date when this happens. For 478 state information is up-to-date when this happens. For
416 interoperability, the string should start with the extension name 479 interoperability, the string should start with the extension name
417 and a colon, to distinguish it from commands for other extensions, 480 and a colon, to distinguish it from commands for other extensions,
461 keysym resource in the rxvt(1) manpage). 524 keysym resource in the rxvt(1) manpage).
462 525
463 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
464 change slightly in the future. 527 change slightly in the future.
465 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
466 on_x_event $term, $event 535 on_x_event $term, $event
467 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
468 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
469 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.
470 542
471 on_focus_in $term 543 on_focus_in $term
472 Called whenever the window gets the keyboard focus, before 544 Called whenever the window gets the keyboard focus, before
473 rxvt-unicode does focus in processing. 545 rxvt-unicode does focus in processing.
474 546
610 $background = urxvt::GET_BASEBG $rend 682 $background = urxvt::GET_BASEBG $rend
611 Return the foreground/background colour index, respectively. 683 Return the foreground/background colour index, respectively.
612 684
613 $rend = urxvt::SET_FGCOLOR $rend, $new_colour 685 $rend = urxvt::SET_FGCOLOR $rend, $new_colour
614 $rend = urxvt::SET_BGCOLOR $rend, $new_colour 686 $rend = urxvt::SET_BGCOLOR $rend, $new_colour
687 $rend = urxvt::SET_COLOR $rend, $new_fg, $new_bg
615 Replace the foreground/background colour in the rendition mask with 688 Replace the foreground/background colour in the rendition mask with
616 the specified one. 689 the specified one.
617 690
618 $value = urxvt::GET_CUSTOM $rend 691 $value = urxvt::GET_CUSTOM $rend
619 Return the "custom" value: Every rendition has 5 bits for use by 692 Return the "custom" value: Every rendition has 5 bits for use by
861 Adds the specified events to the vt event mask. Useful e.g. when you 934 Adds the specified events to the vt event mask. Useful e.g. when you
862 want to receive pointer events all the times: 935 want to receive pointer events all the times:
863 936
864 $term->vt_emask_add (urxvt::PointerMotionMask); 937 $term->vt_emask_add (urxvt::PointerMotionMask);
865 938
939 $term->focus_in
940 $term->focus_out
941 $term->key_press ($state, $keycode[, $time])
942 $term->key_release ($state, $keycode[, $time])
943 Deliver various fake events to to terminal.
944
866 $window_width = $term->width 945 $window_width = $term->width
867 $window_height = $term->height 946 $window_height = $term->height
868 $font_width = $term->fwidth 947 $font_width = $term->fwidth
869 $font_height = $term->fheight 948 $font_height = $term->fheight
870 $font_ascent = $term->fbase 949 $font_ascent = $term->fbase
884 Returns the LC_CTYPE category string used by this rxvt-unicode. 963 Returns the LC_CTYPE category string used by this rxvt-unicode.
885 964
886 $env = $term->env 965 $env = $term->env
887 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
888 hashref similar to "\%ENV". 967 hashref similar to "\%ENV".
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.
889 975
890 $modifiermask = $term->ModLevel3Mask 976 $modifiermask = $term->ModLevel3Mask
891 $modifiermask = $term->ModMetaMask 977 $modifiermask = $term->ModMetaMask
892 $modifiermask = $term->ModNumLockMask 978 $modifiermask = $term->ModNumLockMask
893 Return the modifier masks corresponding to the "ISO Level 3 Shift" 979 Return the modifier masks corresponding to the "ISO Level 3 Shift"
1049 1135
1050 $popup->add_button ($text, $cb) 1136 $popup->add_button ($text, $cb)
1051 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
1052 selected. 1138 selected.
1053 1139
1054 $popup->add_toggle ($text, $cb, $initial_value) 1140 $popup->add_toggle ($text, $initial_value, $cb)
1055 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
1056 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
1057 first argument. 1143 its first argument.
1058 1144
1059 $popup->show 1145 $popup->show
1060 Displays the popup (which is initially hidden). 1146 Displays the popup (which is initially hidden).
1061 1147
1062 The "urxvt::timer" Class 1148 The "urxvt::timer" Class
1068 ->new 1154 ->new
1069 ->interval (1) 1155 ->interval (1)
1070 ->cb (sub { 1156 ->cb (sub {
1071 $term->{overlay}->set (0, 0, 1157 $term->{overlay}->set (0, 0,
1072 sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]); 1158 sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]);
1073 }); 1159 });
1074 1160
1075 $timer = new urxvt::timer 1161 $timer = new urxvt::timer
1076 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
1077 immediately. 1163 immediately.
1078 1164
1166 ->new 1252 ->new
1167 ->start ($pid) 1253 ->start ($pid)
1168 ->cb (sub { 1254 ->cb (sub {
1169 my ($pw, $exit_status) = @_; 1255 my ($pw, $exit_status) = @_;
1170 ... 1256 ...
1171 }); 1257 });
1172 1258
1173 $pw = new urxvt::pw 1259 $pw = new urxvt::pw
1174 Create a new process watcher in stopped state. 1260 Create a new process watcher in stopped state.
1175 1261
1176 $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