2 .TH xatom 1 "13 September 2007" "Straylight/Edgeware" "xtoys"
4 xatom \- manipulate properties on X windows
36 program manipulates properties of a simple kind on X windows. It deals
37 only with those properties whose value is a single X atom. It is
38 capable of setting, reading, and deleting properties, and also waiting
39 until a particular property is set, maybe to one of a number of given
42 The program provides a number of subcommands, by which the various
43 operations may be carried out.
45 Before the command name,
47 may be given. The following global options are supported.
49 .BR "\-h, \-\-help " [\fIcommand\fP...]
50 Writes a brief summary of
52 various operations to standard output, and returns a successful exit
53 status. With command names, gives help on those commands.
56 Writes the program's version number to standard output, and returns a
57 successful exit status.
60 Writes a very terse command line summary to standard output, and returns
61 a successful exit status.
63 .BI "\-d, \-\-display=" display
64 Connect to the X server named by
66 rather than the default, which is to consult the
70 .BI "\-w, \-\-window=" window
71 Manipulate properties on the window whose ID is
73 rather than the default, which is to use the root window of the screen
80 then the window can be chosen interactively: the
82 program will grab the pointer and wait for a button-1 click over a
83 window. A button-3 click causes
85 to quit (and return an unsuccessful exit status).
86 .SH "COMMAND REFERENCE"
90 command behaves exactly as the
92 option. With no arguments, it shows an overview of
94 options; with arguments, it described the named subcommands.
98 command retrieves the named
100 from the specified window, and reports its value on standard output.
102 If the property wasn't found, or its value wasn't a single atom, nothing
103 is written, but a successful exit status is still returned. If a value
104 was found, it is written and followed by a newline: therefore a client
105 can distinguish an empty value from no value at all.
109 command sets the named
111 to have the specified
113 overwriting any existing value.
117 command removes the named
119 from the window. If no such property exists, nothing happens.
123 command waits on a particular
127 are specified, then the command waits until the property's value matches
130 if it already matches one of them then the command won't wait.
133 are specified, then the command waits until the property is set to any
134 value; again, if it is already set, the command returns immediately.
138 is given, the command produces no output; otherwise, it writes the new
139 value of the property, as for the
143 The author uses this command at the end of his
145 file, to control the duration of his X session. Specifically, he uses
151 xatom set MDW_SHUTDOWN READY
152 xatom wait MDW_SHUTDOWN SHUTDOWN
153 xatom delete MDW_SHUTDOWN
167 case "$(xatom get MDW_SHUTDOWN)" in
169 *) xmsg -e -t $me "Nobody's waiting for my signal."; exit 1;;
171 case "$(xmsg -q -t $me \
172 "Really shut down this session?" :_Shutdown \~gtk-cancel)" in
174 xatom set MDW_SHUTDOWN SHUTDOWN
180 None currently known.
183 .BR XChangeProperty (3x),
184 .BR XGetWindowProperty (3x),
185 .BR XDeleteProperty (3x).
187 Mark Wooding (mdw@distorted.org.uk).