root/trunk/xdotool/xdotool.pod

Revision 1109, 5.5 kB (checked in by dkg, 6 months ago)

xdotool: upgrading to 20080720 from upstream.

Line 
1=pod
2
3=head1 NAME
4
5xdotool - command-line X11 automation tool
6
7=head1 SYNOPSIS
8
9B<xdotool> I<cmd> I<args...>
10
11=head1 DESCRIPTION
12
13B<xdotool> lets you programatically (or manually) simulate keyboard input and
14mouse activity, move and resize windows, etc. It does this using X11's
15XTEST extension and other Xlib functions.
16
17There is some support for Extended Window Manager Hints (aka EWMH or NetWM).
18See the L</EXTENDED WINDOW MANAGER HINTS> section for more information.
19
20=head1 KEYBOARD COMMANDS
21
22=over
23
24=item B<key> I<keystroke>
25
26Type a given keystroke. Examples being "alt+r", "Control_L+J",
27"ctrl+alt+n", "BackSpace".
28
29Generally, any valid X Keysym string will work. Multiple keys are
30separated by '+'. Aliases exist for "alt", "ctrl", "shift", "super",
31and "meta" which all map to Foo_L, such as Alt_L and Control_L, etc.
32
33Example: Send the keystroke "F2"
34 xdotool key F2
35
36=item B<keydown> I<keystroke>
37
38Same as above, except only keydown events are sent.
39
40=item B<keyup> I<keystroke>
41
42Same as above, except only keyup events are sent.
43
44=item B<type> I<something to type>
45
46Types a series of letters. In order, as fast as possible.
47
48Example: to type 'Hello world!' you would do:
49 xdotool type 'Hello world!'
50
51=back
52
53=head1 MOUSE COMMANDS
54
55=over
56
57=item B<mousemove> I<x> I<y>
58
59Move the mouse to the specific X and Y coordinates on the screen
60
61=item B<mousedown> I<button>
62
63Send 'mouse down' for the given button. 1 == left, 2 ==  middle,  3  == right,
64etc.
65
66=item B<mouseup> I<button>
67
68Send 'mouse up for the given button
69
70=item B<click> I<button>
71
72Send mousedown followed by mouseup for the given button
73
74=item B<getmouselocation>
75
76Outputs the x, y, and screen location of the mouse cursor. Screen numbers will be nonzero if you have multiple monitors and are not using Xinerama.
77
78=back
79
80=head1 WINDOW COMMANDS
81
82=over
83
84=item B<search> I<[options]> I<somestring>
85
86Search  for windows with titles, names, or classes matching somestring.  The
87output is line-delimited list of X window identifiers
88
89The options available are:
90
91=over
92
93=item B<--onlyvisible> - Show only visible windows in the results.
94
95=item B<--title> - Match against the window title
96
97=item B<--name> - Match against the window name
98
99=item B<--class> - Match against the window class
100
101=back
102
103The default options are C<--title --name --class>
104
105=item B<getwindowfocus>
106
107Prints the window id of the currently focused window
108
109=item B<windowsize> [options] windowid width height
110
111Set the window size of the given window
112
113The options available are:
114
115=over
116
117=item B<--usehints> - Use window sizing hints when setting width and height.
118This is useful on terminals.
119
120=back
121
122Example: To set a terminal to be 80x24 characters, you would use:
123C<xdotool windowsize --usehints windowid 80 24>
124
125=item B<windowmove> I<windowid> I<x> I<y>
126
127Move the window to the given position
128
129=item B<windowfocus> I<windowid>
130
131Focus the window
132
133=item B<windowmap> I<window_id>
134
135Map a window. In X11 terminology, mapping a window means making it visible on
136the screen.
137
138=item B<windowraise> I<window_id>
139
140Raise the window to the top of the stack. This may not work on all window managers.
141
142=item B<windowunmap> I<window_id>
143
144Unmap a window, making it no longer appear on your screen.
145
146=back
147
148=head1 DESKTOP AND WINDOW COMMANDS
149
150These commands follow the EWMH standard. See the section L<EXTENDED WINDOW
151MANAGER HINTS> for more information.
152
153=over
154
155=item B<windowactivate> I<windowid>
156
157Activate the window. This command is different from windowfocus:
158if the window is on another desktop, we will switch to that desktop. It also
159uses a different method for bringing the window up. I recommend trying this
160command before using windowfocus, as it will work on more window managers.
161
162=item B<getactivewindow>
163
164Output the current active window. This command is often more reliable than
165getwindowfocus.
166
167=item B<set_num_desktops> I<number>
168
169Changes the number of desktops or workspaces.
170
171=item B<get_num_desktops>
172
173Output the current number of desktops.
174
175=item B<set_desktop> I<desktop_number>
176
177Change the current view to the specified desktop.
178
179=item B<get_desktop>
180
181Output the current desktop in view.
182
183=item B<set_desktop_for_window> I<window_id> I<desktop_number>
184
185Move a window to a different desktop.
186
187=item B<get_desktop_for_window> I<window_id>
188
189Output the desktop currently containing the given window.
190
191=back
192
193=head1 EXTENDED WINDOW MANAGER HINTS
194
195The following pieces of the EWMH standard are supported:
196
197=over
198
199=item _NET_SUPPORTED
200
201Asks the window manager what is supported
202
203=item _NET_CURRENT_DESKTOP
204
205Query and set the current desktop. Support for this enables these commands:
206C<set_desktop>, C<get_desktop>.
207
208=item _NET_WM_DESKTOP
209
210Query and set what desktop a window is living in. Support for this enables
211these commands: C<set_desktop_for_window>, C<get_desktop_for_window>.
212
213=item _NET_ACTIVE_WINDOW
214
215Allows you to query and set the active window by asking the window manager to
216bring it forward. Support for this enables these commands: C<windowactivate>, C<getactivewindow>.
217
218=back
219
220=head1 SEE ALSO
221
222L<xprop(1)>, L<xwininfo(1)>,
223
224Project site: L<http://www.semicomplete.com/projects/xdotool>
225
226Google Code: L<http://semicomplete.googlecode.com/>
227
228=head1 CONTACT
229
230Please send questions to xdotool-users@googlegroups.com. File bugs and feature requests at the following URL:
231
232L<http://code.google.com/p/semicomplete/issues/list>
233
234=head1 AUTHOR
235
236xdotool was written by Jordan Sissel.
237
238This manual page was written originally by Daniel Kahn Gillmor
239E<lt>dkg-debian.org@fifthhorseman.netE<gt> for the Debian project (but may be
240used by others). It is maintained by Jordan Sissel.
241
242=cut
Note: See TracBrowser for help on using the browser.