1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279
|
'\" t
.TH slrnface 1 "28 Feb 2002"
.GH "28 Feb 2002"
.SH NAME
slrnface \- show
.I X\-Faces
in X11 terminal emulator
.SH SYNOPSIS
.B slrnface
[
.B \-xOffsetChar
.I x_char_offset
] [
.B \-yOffsetChar
.I y_char_offset
] [
.B \-xOffsetPix
.I x_pixel_offset
] [
.B \-yOffsetPix
.I y_pixel_offset
] [
.B \-XFacePad
.I left_padding
] [
.B \-ink
.I fg_color
] [
.B \-paper
.I bg_color
] [
.B \-padColor
.I pad_color
]
.SH DESCRIPTION
The
.B slrnface
helper utility can be used from
.BR slrn (1),
.BR mutt (1)
or similar programs to show
.I X\-Faces
in Usenet articles or mail messages when those programs are run in an X11
terminal emulator. This utility is not intended to be run directly from
the command line. Instead, the master programs should be configured to
invoke
.B slrnface
when appropriate.
.LP
Different terminal emulators have different screen layouts. Some might have
scroolbars (on either side), a menubar or something else. Terminal window
which
.B slrnface
uses might contain some of these "decorations," but it is impossible to
determine if that is the case at run time. Therefore it is impossible to
determine the exact location at which the X11 window with the
.I X\-Face
image should be placed. Default hardcoded values are appropriate for
several terminal emulators, but not for all of them. The placement can be
controlled by command line arguments, but it is strongly suggested to
use X resources for this task.
.LP
While
.B slrnface
is running and showing
.IR X\-Face ,
the left mouse button can be used to move the window around.
.SH RESOURCES
The
.B slrnface
helper is controlled by the resources set for the terminal emulator in which
it runs, not for the
.B slrnface
class or instance. That is because correct execution entirely depends
on
the master program and the geometry of the terminal emulator in use and
has little to do with
.B slrnface
itself. All resources have a command line parameter equivalent.
.LP
.TS
center;
cf3 cf3 cf3
l l l .
Resource Command line parameter Default value
_
slrnface.xOffsetChar -xOffsetChar 0
slrnface.yOffsetChar -yOffsetChar 1
slrnface.xOffsetPix -xOffsetPix 0
slrnface.yOffsetPix -yOffsetPix 2
slrnface.XFacePad -XFacePad 0
slrnface.ink -ink black
slrnface.paper -paper white
slrnface.padColor -padColor black
.TE
.SS xOffsetChar
The horizontal offset for the
.I X\-Face
window from the terminal's upper right corner expressed in character units.
.SS yOffsetChar
The vertical offset for the
.I X\-Face
window from the terminal's upper right corner expressed in character units.
The exact value in pixels will be calculated at run time, as well as the
pixel equivalent for
.BR xOffestChar .
There are some lousily coded terminals which are not very helpful with this,
so the calculation might not be perfect.
.SS xOffsetPix
The horizontal offset for the
.I X\-Face
window from the terminal's upper right corner expressed in pixels.
.SS yOffsetPix
The vertical offset for the
.I X\-Face
window from the terminal's upper right corner expressed in pixels. This value
is added to the character offset provided by the
.B yOffsetChar
resource and the resulting sum is substracted from the vertical coordinate
of the terminal's upper right corner. The equivalent calculation for
the horizontal coordinate is done with the
.B xOffsetChar
and
.B xOffsetPix
resources. In both cases, pixel value resources are provided for finer control.
.SS XFacePad
This value tells
.B slrnface
how many pixels should be cleared on the left side of the
.I X\-Face
image. In the case of long subject lines the image may be displayed over
characters and having some spacing between them would be beneficial.
.SS ink
This is the foreground color for the
.I X\-Face
image. The more common name for this resource is
.IR foreground .
However, that name is not used because there is a high probability that it
would be inherited from the terminal's resources. A lot of users use light
foreground and dark background for terminals. Since
.I X\-Faces
should normally be viewed with dark foreground on light background,
inheriting the colors from the terminal setup would present a negative
image by default. In order to avoid that,
.B slrnface
uses different resource name.
.SS paper
This is the background color for the
.I X\-Face
image.
.SS padColor
This is the color for the padding region set with
.B XFacePad
resource.
.SH EXAMPLES
The following examples demonstrate how to set resources for xterm and
GNOME terminal.
.SS Example 1: horizontal offsets for xterm
Since
.B slrnface
looks at the resources defined for the terminal's class and name, an example
setting is:
.br
.nf
xterm.slrnface.xOffsetChar: 1
xterm.slrnface.xOffsetPix: 2
.fi
It is better to use the application name, rather than class, because some
other terminals use XTerm as their class, since they try to be feature
compatible. However, they might not have the same screen layout, so resources
set for the terminal class might not yield the desired effect in all terminals.
.SS Example 2: usage with GNOME terminal
Resources are used even for terminal emulators which are not normally
controlled by them. You can use the
.BR xprop (1)
utility to find the appropriate
name and class. Thus, if your terminal of choice is GNOME terminal,
vertical offsets and colors can be set like this:
.br
.nf
GnomeTerminal*slrnface.yOffsetChar: 0
GnomeTerminal*slrnface.yOffsetPix: 0
GnomeTerminal*slrnface.ink: red
GnomeTerminal*slrnface.paper: gray
.fi
.SH ENVIRONMENT VARIABLES
.TP 15
.SB DISPLAY
The name of the display where the terminal runs. This environment variable
is the only way to pass it to
.BR slrnface .
.TP 15
.SB WINDOWID
Used for determining terminal's X window id. It must be set by a terminal
emulator.
.TP 15
.SB LANG, LC_ALL, LC_MESSAGES
These environment variables will be used when determining the location
of the appropriate resource file.
.SH EXIT STATUS
The
.B slrnface
helper doesn't print any diagnostic, because it doesn't know if that is
the appropriate action. In cases when diagnostic output is appropriate,
it can't guarantee that the output would be visible to the user. Therefore
it returns distinct error status for every kind of problem and relies on the
parent process to take the appropriate action.
.LP
It should be noted that
.B slrnface
forks early in its execution. The parent process exits immediately, returning
success status to its parent. The child process continues execution, reading
commands from the FIFO in the
.B $HOME/.slrnfaces
directory and executing them as appropriate. In the case where there is a
problem with the process' startup, the fork doesn't happen and
.B slrnface
exits immediately, returning the appropriate error status. The following
exit values are returned:
.TP 4
.B 0
Successful completion.
.TP 4
.B 1
.B slrnface
couldn't connect to the display.
.TP 4
.B 2
Terminal emulator didn't set the
.B WINDOWID
environment variable or its value was invalid.
.TP 4
.B 3
.B slrnface
couldn't find its controlling terminal.
.TP 4
.B 4
Terminal's width or height are not set.
.TP 4
.B 5
There was a problem with the FIFO setup.
.TP 4
.B 6
.BR fork (2)
failed.
.SH FILES
.PD 0
.TP 20
.B $HOME/.slrnfaces/*
A named pipe used for communication between
.B slrnface
and the master proces.
.TP
.B slrnface.sl
An example S-Lang hooks for setting up
.B slrnface
with
.BR slrn (1).
.PD
.SH SEE ALSO
.BR slrn (1),
.BR mutt (1),
.BR X11 (7),
.BR xprop (1),
.BR xterm (1),
.BR fork (2)
.SH BUGS
Multiple
.I X\-Faces
are not supported.
.SH AUTHOR
Drazen Kacar <dave@willfork.com>
.LP
Download location: http://dave.willfork.com/slrnface/
|