DICT_LOOKUP(1)DICT_LOOKUP(1)NAME
dict_lookup - DICT Protocol Client
SYNOPSIS
dict_lookuop [options]
DESCRIPTION
dict_lookup reads X selection, then open terminal emulator and run dict client in it allowing user to view content using pager. It makes
sense to configure launching dict_lookup on a keyboard shortcut in the window manager.
OPTIONS -h display help message.
-x x X coordinate of terminal emulator.
-x Y Y coordinate of terminal emulator.
-s WxH width and height of terminal emulator separated by 'x'.
-q query
query, if it is specified, X selection is not read.
ENVIRONMENT
dict_lookup recognizes the following environment variables. The default value is specified in square brackets.
D_AWK_PROG
AWK interpreter to use. [awk]
D_XCLIP_PROG
xclip application. [xclip]
D_XTERM_PROG
xterm or equivalent terminal emulator. [xterm]
D_UTF8_LOCALE
UTF-8 locale. [first available UTF-8 locale on system]
D_DICT_PROG
Dictionary client program. [dict]
D_DICT_SERVER
Option for dictionary client specifying the server. [-h dict.org]
D_DICT_PORT
Option for dictionary client specifying the port. [-p 2628]
D_DICT_DB_OPT
Option for dictionary client specifying the database. [-d foldoc]
D_XTERM_CLASS
Option for terminal emulator specifying the class. [-class XTerm]
D_XTERM_NAME
Option for terminal emulator specifying the name. [-name xterm_dict]
D_XTERM_TITLE
Option for terminal emulator specifying the title. [-title dict_lookup]
D_TEXT_WIDTH
Program calculating text width for given text. [cyrillic_text_width]
cyrillic_text_width doesn't work correctly for Japanese, Korean, Chinese and some other languages.
D_TERM_X
Terminal emulator X coordinate. [+200]
D_TERM_Y
Terminal emulator Y coordinate. [+200]
D_TERM_H
Terminal emulator height. [+40]
D_PAGER
Pager. [less -R]
SEE ALSO dict(1), less(1), xterm(1), dictd(8), http://www.dict.org, RFC 2229
9 January 2011 DICT_LOOKUP(1)
Check Out this Related Man Page
slrnface(1) General Commands Manual slrnface(1)NAME
slrnface - show X-Faces in X11 terminal emulator
SYNOPSIS
slrnface [ -xOffsetChar x_char_offset ] [ -yOffsetChar y_char_offset ] [ -xOffsetPix x_pixel_offset ] [ -yOffsetPix y_pixel_offset ] [
-XFacePad left_padding ] [ -ink fg_color ] [ -paper bg_color ] [ -padColor pad_color ]
DESCRIPTION
The slrnface helper utility can be used from slrn(1), mutt(1) or similar programs to show 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 slrnface when appropriate.
Different terminal emulators have different screen layouts. Some might have scroolbars (on either side), a menubar or something else. Ter-
minal window which 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 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 suggested to use X resources for this task.
While slrnface is running and showing X-Face, the left mouse button can be used to move the window.
RESOURCES
The slrnface helper is controlled by the resources set for the terminal emulator in which it runs, not for the 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 slrnface itself. All resources have a command line parameter equivalent.
However, a lot of popular terminal emulators have a certain amount of hardcoded brain damage and setting X resources will not have any
effect with them. This usually happens because of illegal characters in the WM_CLASS property. In those cases command line arguments are
the only remaining option.
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
xOffsetChar
The horizontal offset for the X-Face window from the terminal's upper right corner expressed in character units.
yOffsetChar
The vertical offset for the 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 xOffestChar. There are some lousily coded terminals which are not very
helpful with this, so the calculation might not be perfect.
xOffsetPix
The horizontal offset for the X-Face window from the terminal's upper right corner expressed in pixels.
yOffsetPix
The vertical offset for the X-Face window from the terminal's upper right corner expressed in pixels. This value is added to the character
offset provided by the 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 xOffsetChar and xOffsetPix resources. In both cases,
pixel value resources are provided for finer control.
XFacePad
This value tells slrnface how many pixels should be cleared on the left side of the 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.
ink
This is the foreground color for the X-Face image. The more common name for this resource is 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 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, slrnface uses different resource name.
paper
This is the background color for the X-Face image.
padColor
This is the color for the padding region set with XFacePad resource.
EXAMPLES
The following example demonstrates how to set resources for xterm.
Example 1: horizontal offsets for xterm
Since slrnface looks at the resources defined for the terminal's class and name, an example setting is:
xterm.slrnface.xOffsetChar: 1
xterm.slrnface.xOffsetPix: 2
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.
ENVIRONMENT VARIABLES
DISPLAY The name of the display where the terminal runs. This environment variable is the only way to pass it to slrnface.
WINDOWID Used for determining terminal's X window id. It must be set by a terminal emulator.
LANG, LC_ALL, LC_MESSAGES
These environment variables will be used when determining the location of the appropriate resource file.
EXIT STATUS
The slrnface helper doesn't print any diagnostic, because it doesn't know if that is the appropriate action. In cases when diagnostic out-
put 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.
It should be noted that slrnface forks early in its execution. The parent process exits immediately, returning success status to its par-
ent. The child process continues execution, reading commands from the FIFO in the $HOME/.slrnfaces directory and executing them as appro-
priate. In the case where there is a problem with the process' startup, the fork doesn't happen and slrnface exits immediately, returning
the appropriate error status. The following exit values are returned:
0 Successful completion.
1 slrnface couldn't connect to the display.
2 Terminal emulator didn't set the WINDOWID environment variable or its value was invalid.
3 slrnface couldn't find its controlling terminal.
4 Terminal's width or height are not set.
5 There was a problem with the FIFO setup.
6 fork(2) failed.
FILES
$HOME/.slrnfaces/* A named pipe used for communication between slrnface and the master proces.
slrnface.sl An example S-Lang hooks for setting up slrnface with slrn(1).
SEE ALSO slrn(1), mutt(1), X11(5), xprop(1), xterm(1), fork(2)BUGS
Multiple X-Faces are not supported.
AUTHOR
Drazen Kacar <dave@willfork.com>
Home page: http://dave.willfork.com/slrnface/
28 Feb 2002 slrnface(1)