=head2 Terminal Configuration
+=head3 Can I see a typical configuration?
+
+The default configuration tries to be xterm-like, which I don't like that
+much, but it's least surprise to regular users.
+
+As a rxvt or rxvt-unicode user, you are practically supposed to invest
+time into customising your terminal. To get you started, here is the
+author's .Xdefaults entries, with comments on what they do:
+
+ URxvt.cutchars: "()*,<>[]{}|'
+ URxvt.print-pipe: cat >/tmp/xxx
+
+These are just for testing stuff.
+
+ URxvt.imLocale: ja_JP.UTF-8
+ URxvt.preeditType: OnTheSpot,None
+
+This tells rxvt-unicode to use a special locale when communicating with
+the X Input Method, and also tells it to only use the OnTheSpot pre-edit
+type, which requires the C<xim-onthespot> perl extension but rewards me
+with correct-looking fonts.
+
+ URxvt.perl-lib: /root/lib/urxvt
+ URxvt.perl-ext-common: default,selection-autotransform,selection-pastebin,xim-onthespot,remote-clipboard
+ URxvt.selection.pattern-0: ( at .*? line \\d+)
+ URxvt.selection.pattern-1: ^(/[^:]+):\
+ URxvt.selection-autotransform.0: s/^([^:[:space:]]+):(\\d+):?$/:e \\Q$1\\E\\x0d:$2\\x0d/
+ URxvt.selection-autotransform.1: s/^ at (.*?) line (\\d+)$/:e \\Q$1\\E\\x0d:$2\\x0d/
+
+This is my perl configuration. The first two set the perl library
+directory and also tells urxvt to use a large number of extensions. I
+develop for myself mostly, so I actually use most of the extensions I
+write.
+
+The selection stuff mainly makes the selection perl-error-message aware
+and tells it to convert pelr error mssages into vi-commands to load the
+relevant file and go tot he error line number.
+
+ URxvt.scrollstyle: plain
+ URxvt.secondaryScroll: true
+
+As the documentation says: plain is the preferred scrollbar for the
+author. The C<secondaryScroll> confgiures urxvt to scroll in full-screen
+apps, like screen, so lines scorlled out of screen end up in urxvt's
+scrollback buffer.
+
+ URxvt.background: #000000
+ URxvt.foreground: gray90
+ URxvt.color7: gray90
+ URxvt.colorBD: #ffffff
+ URxvt.cursorColor: #e0e080
+ URxvt.throughColor: #8080f0
+ URxvt.highlightColor: #f0f0f0
+
+Some colours. Not sure which ones are being used or even non-defaults, but
+these are in my .Xdefaults. Most notably, they set foreground/background
+to light gray/black, and also make sure that the colour 7 matches the
+default foreground colour.
+
+ URxvt.underlineColor: yellow
+
+Another colour, makes underline lines look different. Sometimes hurts, but
+is mostly a nice effect.
+
+ URxvt.geometry: 154x36
+ URxvt.loginShell: false
+ URxvt.meta: ignore
+ URxvt.utmpInhibit: true
+
+Uh, well, should be mostly self-explanatory. By specifying some defaults
+manually, I can quickly switch them for testing.
+
+ URxvt.saveLines: 8192
+
+A large scrollback buffer is essential. Really.
+
+ URxvt.mapAlert: true
+
+The only case I use it is for my IRC window, which I like to keep
+iconified till people msg me (which beeps).
+
+ URxvt.visualBell: true
+
+The audible bell is often annoying, especially when in a crowd.
+
+ URxvt.insecure: true
+
+Please don't hack my mutt! Ooops...
+
+ URxvt.pastableTabs: false
+
+I once thought this is a great idea.
+
+ urxvt.font: 9x15bold,\
+ -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso10646-1,\
+ -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1, \
+ [codeset=JISX0208]xft:Kochi Gothic, \
+ xft:Bitstream Vera Sans Mono:autohint=true, \
+ xft:Code2000:antialias=false
+ urxvt.boldFont: -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-15
+ urxvt.italicFont: xft:Bitstream Vera Sans Mono:italic:autohint=true
+ urxvt.boldItalicFont: xft:Bitstream Vera Sans Mono:bold:italic:autohint=true
+
+I wrote rxvt-unicode to be able to specify fonts exactly. So don't be
+overwhelmed. A special note: the C<9x15bold> mentioend above is actually
+the version from XFree-3.3, as XFree-4 replaced it by a totally different
+font (different glyphs for C<;> and many other harmless characters),
+while the second font is actually the C<9x15bold> from XFree4/XOrg. The
+bold version has less chars than the medium version, so I use it for rare
+characters, too. Whene ditign sources with vim, I use italic for comments
+and other stuff, which looks quite good with Bitstream Vera anti-aliased.
+
+Terminus is a quite bad font (many very wrong glyphs), but for most of my
+purposes, it works, and gives a different look, as my normal (Non-bold)
+font is already bold, and I want to see a difference between bold and
+normal fonts.
+
+Please note that I used the C<urxvt> instance name and not the C<URxvt>
+class name. Thats because I use different configs for different purposes,
+for example, my IRC window is started with C<-name IRC>, and uses these
+defaults:
+
+ IRC*title: IRC
+ IRC*geometry: 87x12+535+542
+ IRC*saveLines: 0
+ IRC*mapAlert: true
+ IRC*font: suxuseuro
+ IRC*boldFont: suxuseuro
+ IRC*colorBD: white
+ IRC*keysym.M-C-1: command:\033]710;suxuseuro\007\033]711;suxuseuro\007
+ IRC*keysym.M-C-2: command:\033]710;9x15bold\007\033]711;9x15bold\007
+
+C<Alt-Shift-1> and C<Alt-Shift-2> switch between two different font
+sizes. C<suxuseuro> allows me to keep an eye (and actually read)
+stuff while keeping a very small window. If somebody pastes something
+complicated (e.g. japanese), I temporarily switch to a larger font.
+
+The above is all in my C<.Xdefaults> (I don't use C<.Xresources> nor
+C<xrdb>). I also have some resources in a separate C<.Xdefaults-hostname>
+file for different hosts, for example, on ym main desktop, I use:
+
+ URxvt.keysym.C-M-q: command:\033[3;5;5t
+ URxvt.keysym.C-M-y: command:\033[3;5;606t
+ URxvt.keysym.C-M-e: command:\033[3;1605;5t
+ URxvt.keysym.C-M-c: command:\033[3;1605;606t
+ URxvt.keysym.C-M-p: perl:test
+
+The first for keysym definitions allow me to quickly bring some windows
+in the layout I like most. Ion users might start laughing but will stop
+immediately when I tell them that I use my own Fvwm2 module for much the
+same effect as Ion provides, and I only very rarely use the above key
+combinations :->
+
=head3 Why doesn't rxvt-unicode read my resources?
Well, why, indeed? It does, in a way very similar to other X
keys as required for your particular machine.
Terminal Configuration
+ Can I see a typical configuration?
+ The default configuration tries to be xterm-like, which I don't like
+ that much, but it's least surprise to regular users.
+
+ As a rxvt or rxvt-unicode user, you are practically supposed to invest
+ time into customising your terminal. To get you started, here is the
+ author's .Xdefaults entries, with comments on what they do:
+
+ URxvt.cutchars: "()*,<>[]{}|'
+ URxvt.print-pipe: cat >/tmp/xxx
+
+ These are just for testing stuff.
+
+ URxvt.imLocale: ja_JP.UTF-8
+ URxvt.preeditType: OnTheSpot,None
+
+ This tells rxvt-unicode to use a special locale when communicating with
+ the X Input Method, and also tells it to only use the OnTheSpot pre-edit
+ type, which requires the "xim-onthespot" perl extension but rewards me
+ with correct-looking fonts.
+
+ URxvt.perl-lib: /root/lib/urxvt
+ URxvt.perl-ext-common: default,selection-autotransform,selection-pastebin,xim-onthespot,remote-clipboard
+ URxvt.selection.pattern-0: ( at .*? line \\d+)
+ URxvt.selection.pattern-1: ^(/[^:]+):\
+ URxvt.selection-autotransform.0: s/^([^:[:space:]]+):(\\d+):?$/:e \\Q$1\\E\\x0d:$2\\x0d/
+ URxvt.selection-autotransform.1: s/^ at (.*?) line (\\d+)$/:e \\Q$1\\E\\x0d:$2\\x0d/
+
+ This is my perl configuration. The first two set the perl library
+ directory and also tells urxvt to use a large number of extensions. I
+ develop for myself mostly, so I actually use most of the extensions I
+ write.
+
+ The selection stuff mainly makes the selection perl-error-message aware
+ and tells it to convert pelr error mssages into vi-commands to load the
+ relevant file and go tot he error line number.
+
+ URxvt.scrollstyle: plain
+ URxvt.secondaryScroll: true
+
+ As the documentation says: plain is the preferred scrollbar for the
+ author. The "secondaryScroll" confgiures urxvt to scroll in full-screen
+ apps, like screen, so lines scorlled out of screen end up in urxvt's
+ scrollback buffer.
+
+ URxvt.background: #000000
+ URxvt.foreground: gray90
+ URxvt.color7: gray90
+ URxvt.colorBD: #ffffff
+ URxvt.cursorColor: #e0e080
+ URxvt.throughColor: #8080f0
+ URxvt.highlightColor: #f0f0f0
+
+ Some colours. Not sure which ones are being used or even non-defaults,
+ but these are in my .Xdefaults. Most notably, they set
+ foreground/background to light gray/black, and also make sure that the
+ colour 7 matches the default foreground colour.
+
+ URxvt.underlineColor: yellow
+
+ Another colour, makes underline lines look different. Sometimes hurts,
+ but is mostly a nice effect.
+
+ URxvt.geometry: 154x36
+ URxvt.loginShell: false
+ URxvt.meta: ignore
+ URxvt.utmpInhibit: true
+
+ Uh, well, should be mostly self-explanatory. By specifying some defaults
+ manually, I can quickly switch them for testing.
+
+ URxvt.saveLines: 8192
+
+ A large scrollback buffer is essential. Really.
+
+ URxvt.mapAlert: true
+
+ The only case I use it is for my IRC window, which I like to keep
+ iconified till people msg me (which beeps).
+
+ URxvt.visualBell: true
+
+ The audible bell is often annoying, especially when in a crowd.
+
+ URxvt.insecure: true
+
+ Please don't hack my mutt! Ooops...
+
+ URxvt.pastableTabs: false
+
+ I once thought this is a great idea.
+
+ urxvt.font: 9x15bold,\
+ -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso10646-1,\
+ -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1, \
+ [codeset=JISX0208]xft:Kochi Gothic, \
+ xft:Bitstream Vera Sans Mono:autohint=true, \
+ xft:Code2000:antialias=false
+ urxvt.boldFont: -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-15
+ urxvt.italicFont: xft:Bitstream Vera Sans Mono:italic:autohint=true
+ urxvt.boldItalicFont: xft:Bitstream Vera Sans Mono:bold:italic:autohint=true
+
+ I wrote rxvt-unicode to be able to specify fonts exactly. So don't be
+ overwhelmed. A special note: the "9x15bold" mentioend above is actually
+ the version from XFree-3.3, as XFree-4 replaced it by a totally
+ different font (different glyphs for ";" and many other harmless
+ characters), while the second font is actually the "9x15bold" from
+ XFree4/XOrg. The bold version has less chars than the medium version, so
+ I use it for rare characters, too. Whene ditign sources with vim, I use
+ italic for comments and other stuff, which looks quite good with
+ Bitstream Vera anti-aliased.
+
+ Terminus is a quite bad font (many very wrong glyphs), but for most of
+ my purposes, it works, and gives a different look, as my normal
+ (Non-bold) font is already bold, and I want to see a difference between
+ bold and normal fonts.
+
+ Please note that I used the "urxvt" instance name and not the "URxvt"
+ class name. Thats because I use different configs for different
+ purposes, for example, my IRC window is started with "-name IRC", and
+ uses these defaults:
+
+ IRC*title: IRC
+ IRC*geometry: 87x12+535+542
+ IRC*saveLines: 0
+ IRC*mapAlert: true
+ IRC*font: suxuseuro
+ IRC*boldFont: suxuseuro
+ IRC*colorBD: white
+ IRC*keysym.M-C-1: command:\033]710;suxuseuro\007\033]711;suxuseuro\007
+ IRC*keysym.M-C-2: command:\033]710;9x15bold\007\033]711;9x15bold\007
+
+ "Alt-Shift-1" and "Alt-Shift-2" switch between two different font sizes.
+ "suxuseuro" allows me to keep an eye (and actually read) stuff while
+ keeping a very small window. If somebody pastes something complicated
+ (e.g. japanese), I temporarily switch to a larger font.
+
+ The above is all in my ".Xdefaults" (I don't use ".Xresources" nor
+ "xrdb"). I also have some resources in a separate ".Xdefaults-hostname"
+ file for different hosts, for example, on ym main desktop, I use:
+
+ URxvt.keysym.C-M-q: command:\033[3;5;5t
+ URxvt.keysym.C-M-y: command:\033[3;5;606t
+ URxvt.keysym.C-M-e: command:\033[3;1605;5t
+ URxvt.keysym.C-M-c: command:\033[3;1605;606t
+ URxvt.keysym.C-M-p: perl:test
+
+ The first for keysym definitions allow me to quickly bring some windows
+ in the layout I like most. Ion users might start laughing but will stop
+ immediately when I tell them that I use my own Fvwm2 module for much the
+ same effect as Ion provides, and I only very rarely use the above key
+ combinations :->
+
Why doesn't rxvt-unicode read my resources?
Well, why, indeed? It does, in a way very similar to other X
applications. Most importantly, this means that if you or your OS loads
<dt><strong><a name="item_readline">readline (enabled by default)</a></strong><br />
</dt>
<dd>
-A support package that tries to make editing with readline easier. At the
-moment, it reacts to clicking with the left mouse button by trying to
+A support package that tries to make editing with readline easier. At
+the moment, it reacts to clicking shift-left mouse button by trying to
move the text cursor to this position. It does so by generating as many
cursor-left or cursor-right keypresses as required (the this only works
for programs that correctly support wide characters).
slightly in the future.</p>
</dd>
<p></p>
+<dt><strong><a name="item_on_resize_all_windows__24tern_2c__24new_width_2c__">on_resize_all_windows $tern, $new_width, $new_height</a></strong><br />
+</dt>
+<dd>
+Called just after the new window size has been calculcated, but before
+windows are actually being resized or hints are being set. If this hook
+returns TRUE, setting of the window hints is being skipped.
+</dd>
+<p></p>
<dt><strong><a name="item_on_x_event__24term_2c__24event">on_x_event $term, $event</a></strong><br />
</dt>
<dd>
similar to <code>\%ENV</code>.
</dd>
<p></p>
+<dt><strong><a name="item_envv">@envv = $term->envv</a></strong><br />
+</dt>
+<dd>
+Returns the environment as array of strings of the form <code>VAR=VALUE</code>.
+</dd>
+<p></p>
+<dt><strong><a name="item_argv">@argv = $term->argv</a></strong><br />
+</dt>
+<dd>
+Return the argument vector as this terminal, similar to @ARGV, but
+includes the program name as first element.
+</dd>
+<p></p>
<dt><strong><a name="item_modlevel3mask">$modifiermask = $term->ModLevel3Mask</a></strong><br />
</dt>
<dt><strong><a name="item_modmetamask">$modifiermask = $term->ModMetaMask</a></strong><br />
.\" ========================================================================
.\"
.IX Title "rxvt 3"
-.TH rxvt 3 "2006-02-10" "7.6" "RXVT-UNICODE"
+.TH rxvt 3 "2006-02-21" "7.6" "RXVT-UNICODE"
.SH "NAME"
@@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter
.SH "SYNOPSIS"
selection.
.IP "readline (enabled by default)" 4
.IX Item "readline (enabled by default)"
-A support package that tries to make editing with readline easier. At the
-moment, it reacts to clicking with the left mouse button by trying to
+A support package that tries to make editing with readline easier. At
+the moment, it reacts to clicking shift-left mouse button by trying to
move the text cursor to this position. It does so by generating as many
cursor-left or cursor-right keypresses as required (the this only works
for programs that correctly support wide characters).
.Sp
The event is simply the action string. This interface is assumed to change
slightly in the future.
+.ie n .IP "on_resize_all_windows $tern\fR, \f(CW$new_width\fR, \f(CW$new_height" 4
+.el .IP "on_resize_all_windows \f(CW$tern\fR, \f(CW$new_width\fR, \f(CW$new_height\fR" 4
+.IX Item "on_resize_all_windows $tern, $new_width, $new_height"
+Called just after the new window size has been calculcated, but before
+windows are actually being resized or hints are being set. If this hook
+returns \s-1TRUE\s0, setting of the window hints is being skipped.
.ie n .IP "on_x_event $term\fR, \f(CW$event" 4
.el .IP "on_x_event \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_x_event $term, $event"
.IX Item "$env = $term->env"
Returns a copy of the environment in effect for the terminal as a hashref
similar to \f(CW\*(C`\e%ENV\*(C'\fR.
+.ie n .IP "@envv = $term\->envv" 4
+.el .IP "@envv = \f(CW$term\fR\->envv" 4
+.IX Item "@envv = $term->envv"
+Returns the environment as array of strings of the form \f(CW\*(C`VAR=VALUE\*(C'\fR.
+.ie n .IP "@argv = $term\->argv" 4
+.el .IP "@argv = \f(CW$term\fR\->argv" 4
+.IX Item "@argv = $term->argv"
+Return the argument vector as this terminal, similar to \f(CW@ARGV\fR, but
+includes the program name as first element.
.ie n .IP "$modifiermask = $term\->ModLevel3Mask" 4
.el .IP "$modifiermask = \f(CW$term\fR\->ModLevel3Mask" 4
.IX Item "$modifiermask = $term->ModLevel3Mask"
readline (enabled by default)
A support package that tries to make editing with readline easier.
- At the moment, it reacts to clicking with the left mouse button by
+ At the moment, it reacts to clicking shift-left mouse button by
trying to move the text cursor to this position. It does so by
generating as many cursor-left or cursor-right keypresses as
required (the this only works for programs that correctly support
The event is simply the action string. This interface is assumed to
change slightly in the future.
+ on_resize_all_windows $tern, $new_width, $new_height
+ Called just after the new window size has been calculcated, but
+ before windows are actually being resized or hints are being set. If
+ this hook returns TRUE, setting of the window hints is being
+ skipped.
+
on_x_event $term, $event
Called on every X event received on the vt window (and possibly
other windows). Should only be used as a last resort. Most event
Returns a copy of the environment in effect for the terminal as a
hashref similar to "\%ENV".
+ @envv = $term->envv
+ Returns the environment as array of strings of the form "VAR=VALUE".
+
+ @argv = $term->argv
+ Return the argument vector as this terminal, similar to @ARGV, but
+ includes the program name as first element.
+
$modifiermask = $term->ModLevel3Mask
$modifiermask = $term->ModMetaMask
$modifiermask = $term->ModNumLockMask