--- rxvt-unicode/doc/rxvt.7.pod 2006/01/31 21:01:36 1.106 +++ rxvt-unicode/doc/rxvt.7.pod 2006/08/07 15:59:44 1.120 @@ -75,7 +75,24 @@ Try C<@@URXVT_NAME@@d -f -o>, which tells @@URXVT_NAME@@d to open the display, create the listening socket and then fork. -=head3 How do I distinguish wether I'm running rxvt-unicode or a regular xterm? I need this to decide about setting colors etc. +=head3 How can I start @@URXVT_NAME@@d automatically when I run URXVT_NAME@@c? + +If you want to start @@URXVT_NAME@@d automatically whenever you run +@@URXVT_NAME@@c and the daemon isn't running yet, use this script: + + #!/bin/sh + @@URXVT_NAME@@c "$@" + if [ $? -eq 2 ]; then + @@URXVT_NAME@@d -q -o -f + @@URXVT_NAME@@c "$@" + fi + +This tries to create a new terminal, and if fails with exit status 2, +meaning it couldn't connect to the daemon, it will start the daemon and +re-run the command. Subsequent invocations of the script will re-use the +existing daemon. + +=head3 How do I distinguish whether I'm running rxvt-unicode or a regular xterm? I need this to decide about setting colors etc. The original rxvt and rxvt-unicode always export the variable "COLORTERM", so you can check and see if that is set. Note that several programs, JED, @@ -129,7 +146,7 @@ When you C<--enable-everything> (which I unfair, as this involves xft and full locale/XIM support which are quite bloaty inside libX11 and my -libc), the two diverge, but not unreasnobaly so. +libc), the two diverge, but not unreasonably so. text data bss drs rss filename 163431 2152 24 20123 2060 rxvt --enable-everything @@ -226,7 +243,7 @@ This requires XFT support, and the support of your X-server. If that doesn't work for you, blame Xorg and Keith Packard. ARGB visuals aren't -there yet, no matter what they claim. Rxvt-Unicode contains the neccessary +there yet, no matter what they claim. Rxvt-Unicode contains the necessary bugfixes and workarounds for Xft and Xlib to make it work, but that doesn't mean that your WM has the required kludges in place. @@ -239,31 +256,6 @@ by other values to change the degree of opacity. If it doesn't work and your server crashes, you got to keep the pieces. -=head3 Why do some chinese characters look so different than others? - -This is because there is a difference between script and language -- -rxvt-unicode does not know which language the text that is output is, -as it only knows the unicode character codes. If rxvt-unicode first -sees a japanese/chinese character, it might choose a japanese font for -display. Subsequent japanese characters will use that font. Now, many -chinese characters aren't represented in japanese fonts, so when the first -non-japanese character comes up, rxvt-unicode will look for a chinese font --- unfortunately at this point, it will still use the japanese font for -chinese characters that are also in the japanese font. - -The workaround is easy: just tag a chinese font at the end of your font -list (see the previous question). The key is to view the font list as -a preference list: If you expect more japanese, list a japanese font -first. If you expect more chinese, put a chinese font first. - -In the future it might be possible to switch language preferences at -runtime (the internal data structure has no problem with using different -fonts for the same character at the same time, but no interface for this -has been designed yet). - -Until then, you might get away with switching fonts at runtime (see L later in this document). - =head3 Why does rxvt-unicode sometimes leave pixel droppings? Most fonts were not designed for terminal use, which means that character @@ -278,7 +270,7 @@ ask for the character bounding box, which unfortunately is wrong in these cases). -It's not clear (to me at least), wether this is a bug in Xft, freetype, +It's not clear (to me at least), whether this is a bug in Xft, freetype, or the respective font. If you encounter this problem you might try using the C<-lsp> option to give the font more height. If that doesn't work, you might be forced to use a different font. @@ -312,7 +304,7 @@ Yes, using an escape sequence. Try something like this, which has the same effect as using the C<-fn> switch, and takes effect immediately: - printf '\e]50;%s\007' "9x15bold,xft:Kochi Gothic" + printf '\33]50;%s\007' "9x15bold,xft:Kochi Gothic" This is useful if you e.g. work primarily with japanese (and prefer a japanese font), but you have to switch to chinese temporarily, where @@ -324,7 +316,7 @@ Many fonts have difficulties with italic characters and hinting. For example, the otherwise very nicely hinted font C completely fails in it's italic face. A workaround might be to +Mono> completely fails in its italic face. A workaround might be to enable freetype autohinting, i.e. like this: URxvt.italicFont: xft:Bitstream Vera Sans Mono:italic:autohint=true @@ -340,7 +332,7 @@ =head3 Rxvt-unicode doesn't seem to anti-alias its fonts, what is wrong? Rxvt-unicode will use whatever you specify as a font. If it needs to -fall back to it's default font search list it will prefer X11 core +fall back to its default font search list it will prefer X11 core fonts, because they are small and fast, and then use Xft fonts. It has antialiasing disabled for most of them, because the author thinks they look best that way. @@ -390,8 +382,7 @@ URxvt.color14: #00FFFF URxvt.color15: #FFFFFF -And here is a more complete set of non-standard colors described (not by -me) as "pretty girly". +And here is a more complete set of non-standard colors. URxvt.cursorColor: #dc74d1 URxvt.pointerColor: #dc74d1 @@ -412,38 +403,64 @@ URxvt.color7: #e1dddd URxvt.color15: #e1dddd +They have been described (not by me) as "pretty girly". + =head3 Why do some characters look so much different than others? - + See next entry. - + =head3 How does rxvt-unicode choose fonts? - + Most fonts do not contain the full range of Unicode, which is fine. Chances are that the font you (or the admin/package maintainer of your system/os) have specified does not cover all the characters you want to display. - + B makes a best-effort try at finding a replacement font. Often the result is fine, but sometimes the chosen font looks bad/ugly/wrong. Some fonts have totally strange characters that don't resemble the correct glyph at all, and rxvt-unicode lacks the artificial intelligence to detect that a specific glyph is wrong: it has to believe the font that the characters it claims to contain indeed look correct. - + In that case, select a font of your taste and add it to the font list, e.g.: - + @@URXVT_NAME@@ -fn basefont,font2,font3... - + When rxvt-unicode sees a character, it will first look at the base font. If the base font does not contain the character, it will go to the next font, and so on. Specifying your own fonts will also speed up this search and use less resources within rxvt-unicode and the X-server. - + The only limitation is that none of the fonts may be larger than the base font, as the base font defines the terminal character cell size, which must be the same due to the way terminals work. +=head3 Why do some chinese characters look so different than others? + +This is because there is a difference between script and language -- +rxvt-unicode does not know which language the text that is output is, +as it only knows the unicode character codes. If rxvt-unicode first +sees a japanese/chinese character, it might choose a japanese font for +display. Subsequent japanese characters will use that font. Now, many +chinese characters aren't represented in japanese fonts, so when the first +non-japanese character comes up, rxvt-unicode will look for a chinese font +-- unfortunately at this point, it will still use the japanese font for +chinese characters that are also in the japanese font. + +The workaround is easy: just tag a chinese font at the end of your font +list (see the previous question). The key is to view the font list as +a preference list: If you expect more japanese, list a japanese font +first. If you expect more chinese, put a chinese font first. + +In the future it might be possible to switch language preferences at +runtime (the internal data structure has no problem with using different +fonts for the same character at the same time, but no interface for this +has been designed yet). + +Until then, you might get away with switching fonts at runtime (see L later in this document). =head2 Keyboard, Mouse & User Interaction @@ -497,7 +514,7 @@ but when running a program that doesn't parse cursor movements or in some cases during rlogin sessions, it fails to detect this properly. -You can permamently switch this feature off by disabling the C +You can permanently switch this feature off by disabling the C extension: URxvt.perl-ext-common: default,-readline @@ -506,7 +523,7 @@ Some Debian GNUL/Linux users seem to have this problem, although no specific details were reported so far. It is possible that this is caused -by the wrong C setting, although the details of wether and how +by the wrong C setting, although the details of whether and how this can happen are unknown, as C should offer a compatible keymap. See the answer to the previous question, and please report if that helped. @@ -542,7 +559,7 @@ =head3 What's with the strange Backspace/Delete key behaviour? Assuming that the physical Backspace key corresponds to the -BackSpace keysym (not likely for Linux ... see the following +Backspace keysym (not likely for Linux ... see the following question) there are two standard values that can be used for Backspace: C<^H> and C<^?>. @@ -643,6 +660,160 @@ =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. It's certainly +not I, but what's typical... + + 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 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 perl error messages 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 configures urxvt to scroll in full-screen +apps, like screen, so lines scrolled 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> mentioned 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. When editing 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 instance name and not the C +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 and C switch between two different font +sizes. C 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). 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 @@ -660,7 +831,7 @@ URxvt.resource: value If you want to use another form (there are lots of different ways of -specifying resources), make sure you understand wether and why it +specifying resources), make sure you understand whether and why it works. If unsure, use the form above. =head3 When I log-in to another system it tells me about missing terminfo data? @@ -707,7 +878,7 @@ library (Fedora Core's bash is one example) and rely on a termcap entry for C. -You could use rxvt's termcap entry with resonable results in many cases. +You could use rxvt's termcap entry with reasonable results in many cases. You can also create a termcap entry by using terminfo's infocmp program like this: @@ -739,8 +910,8 @@ =head3 Why does C no longer have coloured output? The C in the GNU coreutils unfortunately doesn't use terminfo to -decide wether a terminal has colour, but uses it's own configuration -file. Needless to say, C is not in it's default file (among +decide whether a terminal has colour, but uses its own configuration +file. Needless to say, C is not in its default file (among with most other terminals supporting colour). Either add: TERM rxvt-unicode @@ -791,7 +962,7 @@ The best thing is to fix your startup environment, as you will likely run into other problems. If nothing works you can try this in your .profile. - printf '\e]701;%s\007' "$LC_CTYPE" + printf '\33]701;%s\007' "$LC_CTYPE" If this doesn't work, then maybe you use a C specification not supported on your systems. Some systems have a C command which @@ -822,7 +993,7 @@ applications so everybody agrees on character properties such as width and code number. This mechanism is the I. Applications not using that info will have problems (for example, C gets the width of -characters wrong as it uses it's own, locale-independent table under all +characters wrong as it uses its own, locale-independent table under all locales). Rxvt-unicode uses the C locale category to select encoding. All @@ -851,7 +1022,7 @@ Yes, using an escape sequence. Try something like this, which sets rxvt-unicode's idea of C. - printf '\e]701;%s\007' ja_JP.SJIS + printf '\33]701;%s\007' ja_JP.SJIS See also the previous answer. @@ -860,14 +1031,45 @@ (e.g. UTF-8). For example, I use this script to start C, which first switches to a locale supported by xjdic and back later: - printf '\e]701;%s\007' ja_JP.SJIS + printf '\33]701;%s\007' ja_JP.SJIS xjdic -js - printf '\e]701;%s\007' de_DE.UTF-8 + printf '\33]701;%s\007' de_DE.UTF-8 You can also use xterm's C program, which usually works fine, except for some locales where character width differs between program- and rxvt-unicode-locales. +=head3 I have problems getting my input method working. + +Try a search engine, as this is slightly different for every input method server. + +Here is a checklist: + +=over 4 + +=item - Make sure your locale I the imLocale are supported on your OS. + +Try C or check the documentation for your OS. + +=item - Make sure your locale or imLocale matches a locale supported by your XIM. + +For example, B does not support UTF-8 locales, you should use +C or equivalent. + +=item - Make sure your XIM server is actually running. + +=item - Make sure the C environment variable is set correctly when I rxvt-unicode. + +When you want to use e.g. B, it must be set to +C<@im=kinput2>. For B, use C<@im=SCIM>. You can see what input +method servers are running with this command: + + xprop -root XIM_SERVERS + +=item + +=back + =head3 My input method wants but I want UTF-8, what can I do? You can specify separate locales for the input method and the rest of the @@ -876,9 +1078,9 @@ URxvt.imlocale: ja_JP.EUC-JP Now you can start your terminal with C and still -use your input method. Please note, however, that you will not be able to -input characters outside C in a normal way then, as your input -method limits you. +use your input method. Please note, however, that, depending on your Xlib +version, you may not be able to input characters outside C in a +normal way then, as your input method limits you. =head3 Rxvt-unicode crashes when the X Input Method changes or exits. @@ -914,7 +1116,7 @@ You should build one binary with the default options. F now enables most useful options, and the trend goes to making them -runtime-switchable, too, so there is usually no drawback to enbaling them, +runtime-switchable, too, so there is usually no drawback to enabling them, except higher disk and possibly memory usage. The perl interpreter should be enabled, as important functionality (menus, selection, likely more in the future) depends on it. @@ -959,11 +1161,11 @@ Rxvt-unicode requires the symbol C<__STDC_ISO_10646__> to be defined in your compile environment, or an implementation that implements it, -wether it defines the symbol or not. C<__STDC_ISO_10646__> requires that +whether it defines the symbol or not. C<__STDC_ISO_10646__> requires that B is represented as unicode. -As you might have guessed, FreeBSD does neither define this symobl nor -does it support it. Instead, it uses it's own internal representation of +As you might have guessed, FreeBSD does neither define this symbol nor +does it support it. Instead, it uses its own internal representation of B. This is, of course, completely fine with respect to standards. However, that means rxvt-unicode only works in C, C and @@ -1007,14 +1209,12 @@ =head1 RXVT-UNICODE TECHNICAL REFERENCE -=head1 DESCRIPTION - The rest of this document describes various technical aspects of B. First the description of supported command sequences, followed by pixmap support and last by a description of all features selectable at C time. -=head1 Definitions +=head2 Definitions =over 4 @@ -1042,7 +1242,7 @@ =back -=head1 Values +=head2 Values =over 4 @@ -1095,7 +1295,7 @@ =back -=head1 Escape Sequences +=head2 Escape Sequences =over 4 @@ -1203,7 +1403,7 @@ X -=head1 CSI (Command Sequence Introducer) Sequences +=head2 CSI (Command Sequence Introducer) Sequences =over 4 @@ -1483,7 +1683,7 @@ X -=head1 DEC Private Modes +=head2 DEC Private Modes =over 4 @@ -1509,7 +1709,7 @@ =over 4 -=item B<< C >> (DECCKM) +=item B<< C >> (DECCKM) =begin table @@ -1518,7 +1718,7 @@ =end table -=item B<< C >> (ANSI/VT52 mode) +=item B<< C >> (ANSI/VT52 mode) =begin table @@ -1527,7 +1727,7 @@ =end table -=item B<< C >> +=item B<< C >> =begin table @@ -1536,7 +1736,7 @@ =end table -=item B<< C >> +=item B<< C >> =begin table @@ -1545,7 +1745,7 @@ =end table -=item B<< C >> +=item B<< C >> =begin table @@ -1554,7 +1754,7 @@ =end table -=item B<< C >> +=item B<< C >> =begin table @@ -1563,7 +1763,7 @@ =end table -=item B<< C >> +=item B<< C >> =begin table @@ -1572,7 +1772,7 @@ =end table -=item B<< C >> I +=item B<< C >> I =begin table @@ -1581,7 +1781,7 @@ =end table -=item B<< C >> X10 XTerm +=item B<< C >> X10 XTerm =begin table @@ -1590,7 +1790,7 @@ =end table -=item B<< C >> +=item B<< C >> =begin table @@ -1599,7 +1799,7 @@ =end table -=item B<< C >> +=item B<< C >> =begin table @@ -1608,7 +1808,7 @@ =end table -=item B<< C >> (B) +=item B<< C >> (B) =begin table @@ -1617,11 +1817,11 @@ =end table -=item B<< C >> I +=item B<< C >> I Enter Tektronix Mode (DECTEK) -=item B<< C >> +=item B<< C >> =begin table @@ -1630,7 +1830,7 @@ =end table -=item B<< C >> I +=item B<< C >> I =begin table @@ -1639,7 +1839,7 @@ =end table -=item B<< C >> I +=item B<< C >> I =begin table @@ -1648,9 +1848,9 @@ =end table -=item B<< C >> I +=item B<< C >> I -=item B<< C >> +=item B<< C >> =begin table @@ -1661,7 +1861,7 @@ X -=item B<< C >> +=item B<< C >> =begin table @@ -1670,7 +1870,7 @@ =end table -=item B<< C >> +=item B<< C >> =begin table @@ -1679,7 +1879,7 @@ =end table -=item B<< C >> (X11 XTerm) +=item B<< C >> (X11 XTerm) =begin table @@ -1688,7 +1888,7 @@ =end table -=item B<< C >> (X11 XTerm) I +=item B<< C >> (X11 XTerm) I =begin table @@ -1697,7 +1897,7 @@ =end table -=item B<< C >> (B) +=item B<< C >> (B) =begin table @@ -1706,7 +1906,7 @@ =end table -=item B<< C >> (B) +=item B<< C >> (B) =begin table @@ -1715,7 +1915,7 @@ =end table -=item B<< C >> (B) +=item B<< C >> (B) =begin table @@ -1724,7 +1924,7 @@ =end table -=item B<< C >> +=item B<< C >> =begin table @@ -1733,7 +1933,7 @@ =end table -=item B<< C >> +=item B<< C >> =begin table @@ -1742,7 +1942,7 @@ =end table -=item B<< C >> +=item B<< C >> =begin table @@ -1757,7 +1957,7 @@ X -=head1 XTerm Operating System Commands +=head2 XTerm Operating System Commands =over 4 @@ -1805,8 +2005,6 @@ =back -X - =head1 XPM For the XPM XTerm escape sequence B<< C >> then value @@ -2207,8 +2405,9 @@ user-pty (-pty-fd) hold on exit (-hold) skip builtin block graphics (-sbg) + separate highlightcolor support (-hc) -It also enabled some non-essential features otherwise disabled, such as: +It also enables some non-essential features otherwise disabled, such as: some round-trip time optimisations nearest color allocation on pseudocolor screens @@ -2251,7 +2450,7 @@ =item --enable-dmalloc (default: off) Use Gray Watson's malloc - which is good for debugging See -http://www.letters.com/dmalloc/ for details If you use either this or the +L for details If you use either this or the next option, you may need to edit src/Makefile after compiling to point DINCLUDE and DLIB to the right places.