Annotation of researchv9/X11/src/X.V11R1/clients/xprop/xprop.man, revision 1.1

1.1     ! root        1: .TH XPROP 1 "6 July 1987" "X Version 11"
        !             2: .SH NAME
        !             3: xprop - X Window System property displayer.
        !             4: .SH SYNOPSIS
        !             5: .B "xprop"
        !             6: [ -help ] [ -id \fIid\fP ] [ -root ] [ -name \fIname\fP ] [ -font \fIfont\fP ]
        !             7: [ \fIhost\fP:\fIdisplay\fP ]
        !             8: [ -len \fIn\fP ] [ -notype ] [ -fs \fIfile\fP ] 
        !             9: [ -f \fIatom\fP \fIformat\fP [\fIdformat\fP] ]*
        !            10: [ \fIformat\fP [\fIdformat\fP] \fIatom\fP ]*
        !            11: .SH DESCRIPTION
        !            12: .PP
        !            13: .I Xprop
        !            14: is a utility for displaying X properties.  Both the properties of windows
        !            15: and fonts can be displayed.  One window or font is selected using the command
        !            16: line arguemnts or possibly in the case of a window, by clicking on the desired
        !            17: window.  A list of properties is then given, possibly with formatting
        !            18: information.
        !            19: .PP
        !            20: For each of these properties, its value on the selected window
        !            21: or font is printed using the supplied formatting information if any.  If no
        !            22: formatting information is supplied, internal defaults are used.  If a property
        !            23: is not defined on the selected window or font, "not defined" is printed as the
        !            24: value for that property.  If no property list is given, all the properties
        !            25: possessed by the selected window or font are printed.
        !            26: .PP
        !            27: A window may be selected in one of four ways.  First, if the desired window
        !            28: is the root window, the -root argument may be used.
        !            29: If the desired window is not the root window, it may be selected
        !            30: in two ways on the command line, either by id number such as might be obtained
        !            31: from \fIxwininfo\fP, or by name if the window possesses a name.  The -id
        !            32: argument selects a window by id number in either decimal or hex (must start
        !            33: with 0x) while the -name argument selects a window by name.
        !            34: .PP
        !            35: The last way to select a window does not involve the command line at all.
        !            36: If none of -font, -id, -name, and -root are specified, a crosshairs cursor
        !            37: is displayed and the user allowed to choose any visible window by pressing
        !            38: any mouse button in the desired window.  If it is desired to display properties
        !            39: of a font as opposed to a window, the -font argument may be used.
        !            40: .PP
        !            41: Other than the above four arguments and the -help argument for obtaining help,
        !            42: all the other command line arguments are used in specifing both the format
        !            43: of the properties to be displayed and how to display them.  The -len \fIn\fP 
        !            44: argument specifies that at most \fIn\fP bytes of any given property will be
        !            45: read and displayed.  This is useful for example when displaying the cut buffer
        !            46: on the root window which could run to several pages if displayed in full.
        !            47: .PP
        !            48: Normally each property name is displayed by printing first the property
        !            49: name then its type if it has one in ()'s followed by its value.
        !            50: The -notype argument specifies that types of the properties should not be
        !            51: displayed.  The -fs argument is used to specify a file containing a list of
        !            52: formats for properties while the -f argument is used to specify the format
        !            53: for one property.
        !            54: .PP
        !            55: The formatting information for a property actually consists of two parts,
        !            56: a \fIformat\fP and a \fIdformat\fP.  The \fIformat\fP specifies the actual
        !            57: formatting of the property (i.e., is it made up of words, bytes, or longs?,
        !            58: etc.) while the \fIdformat\fP specifies how the property should be displayed.
        !            59: .PP
        !            60: The following paragraphs describe how to construct \fIformat\fPs and
        !            61: \fIdformat\fPs.  However, for the vast majority of users and uses, this should
        !            62: not be necessary as the built in defaults contain the \fIformat\fPs and
        !            63: \fIdformat\fPs necessary to display all the standard properties.  It should
        !            64: only be necessary to muck about with \fIformat\fPs and \fIdformat\fPs
        !            65: if a new property is being dealt with or the user dislikes the standard display
        !            66: format.  New users especially are encouraged to skip this part.
        !            67: .PP
        !            68: A \fIformat\fP consists of one of 0, 8, 16, or 32 followed by a sequence of one
        !            69: or more format characters.  The 0, 8, 16, or 32 specifies how many bits per
        !            70: field there are in the property.  Zero is a special case meaning use the
        !            71: field size information associated with the property itself. (this is only
        !            72: needed for special cases like type INTEGER which is actually three different
        !            73: types depending on the size of the fields of the property)
        !            74: .PP
        !            75: A value of 8 means
        !            76: that the property is a sequence of bytes while a value of 16 would mean that
        !            77: the property is a sequence of words.  The difference between these two lies in
        !            78: the fact that the sequence of words will be byte swapped while the sequence of
        !            79: bytes will not be when read by a machine of the opposite byte order of the
        !            80: machine that orginally wrote the property.  For more information on how
        !            81: properties are formatted and stored, consult the X 11 XLib manual.
        !            82: .PP
        !            83: Once the size of the fields has been specified, it is necessary to specify
        !            84: the type of each field (i.e., is it an integer, a string, an atom, or what?)
        !            85: This is done using one format character per field.  If there are more fields
        !            86: in the property than format characters supplied, the last character will be
        !            87: repeated as many times as necessary for the extra fields.  The format
        !            88: characters and their meaning are as follows:
        !            89: .TP
        !            90: a
        !            91: The field holds a atom number.  A field of this type should be of size 32.
        !            92: .TP
        !            93: b
        !            94: The field is an boolean.  A 0 means false while anything else means true.
        !            95: .TP
        !            96: c
        !            97: The field is an unsigned number, a cardinal.
        !            98: .TP
        !            99: i
        !           100: The field is a signed integer.
        !           101: .TP
        !           102: m
        !           103: The field is a set of bit flags, 1 meaning on.
        !           104: .TP
        !           105: s
        !           106: This field and the next ones until either a 0 or the end of the property
        !           107: represent a sequence of bytes.  This format character is only usable with
        !           108: a field size of 8 and is most often used to represent a string.
        !           109: .TP
        !           110: x
        !           111: The field is a hex number (like 'c' but displayed in hex - most useful
        !           112: for displaying window ids and the like)
        !           113: .PP
        !           114: An example \fIformat\fP is 32ica which is the format for a property of three
        !           115: fields of 32 bits each, the first holding a signed integer, the second an
        !           116: unsigned integer, and the third an atom.
        !           117: .PP
        !           118: The format of a \fIdformat\fP unlike that of a \fIformat\fP is not so rigid.
        !           119: The only limitations on a \fIdformat\fP is that one may not start with a letter
        !           120: or a dash.  This is so that it can be distingished from a property name or
        !           121: an argument.  A \fIdformat\fP is a text string containing special characters
        !           122: instructing that various fields be printed at various points in a manor similar
        !           123: to the formatting string used by printf.  For example, the \fIdformat\fP
        !           124: " is ( $0, $1 \\)\\n" would render the POINT 3, -4 which has a \fIformat\fP of
        !           125: 32ii as " is ( 3, -4 )\\n".
        !           126: .PP
        !           127: Any character other than a $, ?, \\, or a ( in a \fIdformat\fP prints as
        !           128: itself.  To print out one of $, ?, \\, or ( preceed it by a \\.  I.e.,
        !           129: to print out a $, use \\$.  Several special backslash sequences are provided
        !           130: as shortcuts.  \\n will cause a newline to be displayed while \\t will
        !           131: cause a tab to be displayed.  \\\fIo\fP where \fIo\fP is an octal number
        !           132: will display character number \fIo\fP.
        !           133: .PP
        !           134: A $ followed by a number \fIn\fP causes field number \fIn\fP to be
        !           135: displayed.  The format of the displayed field depends on the formatting
        !           136: character used to describe it in the corrsponding \fIformat\fP.  I.e., if
        !           137: a cardinal is described by 'c' it will print in decimal while if it is
        !           138: described by a 'x' it is displayed in hex.
        !           139: .PP
        !           140: If the field is not present in
        !           141: the property (this is possible with some properties), <field not available>
        !           142: is displayed instead.  $\fIn\fP+ will display field number \fIn\fP then a
        !           143: comma then field number \fIn\fP+1 then another comma then ... until the last
        !           144: field defined.  If field \fIn\fP is not defined, nothing is displayed.
        !           145: This is useful for a property that is a list of values.
        !           146: .PP
        !           147: A ? is used to start a conditional expression, a kind of if-then statement.
        !           148: ?\fIexp\fP(\fItext\fP) will display \fItext\fP iff \fIexp\fP evaluates to
        !           149: non-zero.  This is useful for two things.  First, it allows fields to be
        !           150: displayed iff a flag is set.  And second, it allows a value to such as a state
        !           151: number to be displayed as a name rather than as just a number.  The syntax of
        !           152: \fIexp\fP is as follows:
        !           153: .TP
        !           154: \fIexp\fP
        !           155: ::= \fIterm\fP | \fIterm\fP=\fIexp\fP | !\fIexp\fP
        !           156: .TP
        !           157: \fIterm\fP
        !           158: ::= \fIn\fP | $\fIn\fP | m\fIn\fP
        !           159: .PP
        !           160: ! is a not operator changing 0 to 1 and any non-zero value to 0.
        !           161: = is an equality operator.  Note that internally all expressions are evaluated
        !           162: as 32 bit numbers so -1 is not equal to 65535.  = returns 1 if the two values
        !           163: are equal and 0 if not.
        !           164: \fIn\fP represents the constant value \fIn\fP while $\fIn\fP represents the
        !           165: value of field number \fIn\fP.
        !           166: m\fIn\fP is 1 if flag number \fIn\fP in the first field having format
        !           167: character 'm' in the corrsponding \fIformat\fP is 1, 0 otherwise.
        !           168: .PP
        !           169: Examples: ?m3(count: $3\\n) displays field 3 with a label of count iff flag
        !           170: number 3 (count starts at 0!) is on.  ?$2=0(True)?!$2=0(False) displays the
        !           171: inverted value of field 2 as a boolean.
        !           172: .PP
        !           173: In order to display a property, \fIxprop\fP needs both a \fIformat\fP and a
        !           174: \fIdformat\fP.  Before \fIxprop\fP uses its default values of a \fIformat\fP
        !           175: of 32x and a \fIdformat\fP of " = { $0+ }\\n", it searches several places
        !           176: in an attempt to find more specific formats.
        !           177: First, a search is made using the name of the property.  If this
        !           178: fails, a search is made using the type of the property.  This allows type
        !           179: STRING to be defined with one set of formats while allowing property WM_NAME
        !           180: which is of type STRING to be defined with a different format.  In this way,
        !           181: the display formats for a given type can be overridden for specific properties.
        !           182: .PP
        !           183: The locations searched are in order: the format if any specified with the
        !           184: property name (as in 8x WM_NAME), the formats defined by -f options in last to
        !           185: first order, the contents of the file specified by the -fs option if any,
        !           186: the contents of the file specified by the environmental variable XPROPFORMATS
        !           187: if any, and finally \fIxprop\fP's built in file of formats.
        !           188: .PP
        !           189: The format of the files refered to by the -fs argument and the XPROPFORMATS
        !           190: variable is one or more lines of the following form:
        !           191: .PP
        !           192: \fIname\fP \fIformat\fP [\fIdformat\fP]
        !           193: .PP
        !           194: Where \fIname\fP is either the name of a property or the name of a type,
        !           195: \fIformat\fP is the \fIformat\fP to be used with \fIname\fP and \fIdformat\fP
        !           196: is the \fIdformat\fP to be used with \fIname\fP.  If \fIdformat\fP is not
        !           197: present, " = $0+\\n" is assumed.
        !           198: .SH EXAMPLES
        !           199: .PP
        !           200: To display the name of the root window: \fIxprop\fP -root WM_NAME
        !           201: .PP
        !           202: To display the window manager hints for the clock: \fIxprop\fP -name xclock
        !           203: WM_HINTS
        !           204: .PP
        !           205: To display the start of the cut buffer: \fIxprop\fP -root -len 100 CUT_BUFFER0
        !           206: .PP
        !           207: To display the point size of the fixed font: \fIxprop\fP -font fixed POINT_SIZE
        !           208: .PP
        !           209: To display all the properties of window # 0x200007: \fIxprop\fP -id 0x200007
        !           210: .SH ARGUMENT SUMMARY
        !           211: .PP
        !           212: .TP 8
        !           213: .B "-help"
        !           214: Print out the 'Usage:' command syntax summary.
        !           215: .PP
        !           216: .TP 8
        !           217: .B "-id \fIid\fP"
        !           218: This argument allows the user to select window \fIid\fP  on  the
        !           219: command  line rather than using the mouse to select the target window.
        !           220: This is very useful in  debugging  X  applications  where  the  target
        !           221: window is not mapped to the screen or where the use of the mouse might
        !           222: be impossible or interfere with the application.
        !           223: .PP
        !           224: .TP 8
        !           225: .B "-name \fIname\fP"
        !           226: This argument allows the user to specify that the window named \fIname\fP
        !           227: is the target window on the command line rather than using the mouse to
        !           228: select the target window.
        !           229: .PP
        !           230: .TP 8
        !           231: .B "-font \fIfont\fP"
        !           232: This argument allows the user to specify that the properties of font
        !           233: \fIfont\fP should be displayed.
        !           234: .PP
        !           235: .TP 8
        !           236: .B "-root"
        !           237: This  argument  specifies  that  X's root window is the target window.
        !           238: This is useful in situations  where  the  root  window  is  completely
        !           239: obscured.
        !           240: .PP
        !           241: .TP 8
        !           242: .B "\fIhost\fP:\fIdisplay\fP"
        !           243: This  argument  allow  you  to  specify the host and display number on
        !           244: which to find the target window.  For example `xprop orpheus:1'
        !           245: would specify that the target window is on display `1' on the machine
        !           246: `orpheus'.  By default,
        !           247: .I xprop
        !           248: uses  the  host  and display number stored in the environment variable
        !           249: DISPLAY, and therefore this argument is not normally specified.
        !           250: .PP
        !           251: .TP 8
        !           252: .B "-len \fIn\fP"
        !           253: Specifies that at most \fIn\fP bytes of any property should be read or
        !           254: displayed.
        !           255: .PP
        !           256: .TP 8
        !           257: .B "-notype"
        !           258: Specifies that the type of each property should not be displayed.
        !           259: .PP
        !           260: .TP 8
        !           261: .B "-fs \fIfile\fP"
        !           262: Specifies that file \fIfile\fP should be used as a source of more formats
        !           263: for properties.
        !           264: .PP
        !           265: .TP 8
        !           266: .B "-f \fIname\fP \fIformat\fP [\fIdformat\fP]"
        !           267: Specifies that the \fIformat\fP for \fIname\fP should be \fIformat\fP and that
        !           268: the \fIdformat\fP for \fIname\fP should be \fIdformat\fP.  If \fIdformat\fP
        !           269: is missing, " = $0+\\n" is assumed.
        !           270: .SH ENVIRONMENT
        !           271: .PP
        !           272: .TP 8
        !           273: .B XPROPFORMATS
        !           274: Specifies the name of a file from which additional formats are to be obtained.
        !           275: .PP
        !           276: .TP 8
        !           277: .B DISPLAY
        !           278: To get default host and display number.
        !           279: .SH SEE ALSO
        !           280: X(1), XWININFO(1)
        !           281: .SH AUTHOR
        !           282: Mark Lillibridge, MIT Project Athena
        !           283: .br
        !           284: Copyright 1987, Massachusetts Institute of Technology.
        !           285: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.