Questions tagged [xdotool]

a command line tool that can simulate X11 keyboard input and mouse activity and manipulate windows

xdotool lets you automate window manipulation and inject events under . In can be used from the command line and in scripts. Its main capabilities are:

  • List and filter windows by application class, title, process ID, etc.
  • Move and resize windows, iconify or maximize them, change the focus, etc.
  • Switch to another desktop (workspace), and move windows across desktops.
  • Simulate keypresses and mouse actions, e.g. to enter input and trigger commands in GUI applications.

It works through X11's XTEST extension and other Xlib functions.

128 questions
16
votes
3 answers

How to get window id from xdotool Window Stack

I need id of window which is active or focused. I try to use xdotool command. There is command: xdotool getactivewindow the result is saved to window stack. I want to get widnow id from this window stack. Command xdotool getactivewindow…
Mariusz
  • 349
12
votes
1 answer

How can I press the Windows key with xdotool

How can I press the start key with xdotool? By start key, I mean the key with the Windows icon.
user123456
  • 5,018
9
votes
4 answers

Can xdotool be used on some window not in the front?

On Ubuntu desktop, can I use xdotool to mouse click (e.g. click a link) and press some keys (e.g. Ctrl+s) on a window (e.g. Firefox's window) that is not in the front, so that I can work on another different window which may need to lie on top of…
Tim
  • 101,790
6
votes
1 answer

How to combine conditions with xdotool?

Is it possible to search for both the --class and --name using xdotool? xdotool search --all --onlyvisible --class "some_val" --name "another val" The above returns an error because the first condition, --class, already returns window ids before…
dgo.a
  • 779
4
votes
1 answer

xdotool: command to resize current active firefox window?

I have multiple firefox windows, I'd like to use a shortcut of current window manager to resize curent active firefox's window to specific size and position. How xdotool command to achieve this? EDIT: For example I have window manager named dwm and…
Tuyen Pham
  • 1,805
4
votes
1 answer

xdotool - how to get window id given its X and Y?

I can get X and Y of the active window with xdotool getwindowgeometry --shell $(xdotool getactivewindow). How do I do a backwards process - find window id given its X and Y? I'm only interested in the topmost window, not the one that may be hidden…
Fluffy
  • 2,077
3
votes
1 answer

how do I make xdotool press ctrl c and ctrl v

xdotool key Ctrl+V or Ctrl+C does not work (I am on rpi3b+)
2
votes
0 answers

What is the Difference Between xdotool getactive window and xdotool getwindowfocus

The commands xdotool getactivewindow and xdotool getwindowfocus return the exact same output. What is the difference between the two?
Amarakon
  • 333
2
votes
1 answer

xdotool requiring matching all options

with xdotool I want to identify that dialog box that appears when you use a master password with Firefox. I tried this command: xdotool search --all --name "Password Required - Mozilla Firefox" --classname Firefox But, it gives an error: xdotool:…
1
vote
1 answer

xdotool issues with keyboard layout configurations having non-US defaults

I tried using the xdotool commandline on a Chrome window in Debian, typically by doing: sleep 2 && xdotool type "2" # Switch to the Chrome window and focus on the relevant text field # before the 2 seconds timer above runs out; "2" should be…
cymbaz
  • 11
0
votes
0 answers

xdotool command chaining

I'd like to pause the vlc player by sending the space key to its main window. What I tried is : xdotool search --class vlc key space And xdotool search --classname vlc key space That didn't work. What worked is : xdotool search --class vlc | while…
ychaouche
  • 998
0
votes
1 answer

Can't have the --window option work with xdotool click

I'm trying to make an autoclicker (for a farm) in a video-game (Minecraft if you want to know) that works even if the window is in the back. I disabled the game auto-pause upon losing window focus successfuly and then tried to use xdotool click…
0
votes
2 answers

How to create a kill switch for xdotool?

I used xdotool to automate some actions. It takes data from a spreadsheet, and "types" it into a Web site, instead of me having to manually copy and paste all of that data over, saving hundreds of hours of work. This is running through a simple…
Village
  • 5,035
  • 15
  • 50
  • 84