Questions tagged [xdotool]

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

Filter by
Sorted by
Tagged with
11
votes
1answer
11k views

`xdotool` does not send keys

I am trying to send keystrokes via xdotool. However, sending does not work properly. Below is the log of a script that should select all the text in Gedit and copy it (but it does nothing instead), ...
4
votes
1answer
654 views

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 ...
4
votes
1answer
707 views

Command-line tool to get "click and drag" rectangle coordinates from the screen [closed]

I would like to execute a command-line command that activates "click and drag" mouse selection on a single local X11 screen. The goal is to: get the selected rectangle X and Y coordinates, ...
11
votes
3answers
32k views

How to get window ID from process ID

This command will get the PID of the xterm process launched: xterm & export APP_PID=$! How can I get the window ID associated to that process (the xterm window ID)? I mean, the ID that xdotool ...
7
votes
1answer
4k views

Run program on a key press without interupting the key event

Is it possible to bind a (global) key press to some command and still not disrupt the key press from completing? What I mean is, if I try the bindkey solution posted elsewhere here: # In file: ~/....
5
votes
2answers
2k views

X: Find out if a window is visible to the user i.e. not covered by others

I only want to execute a certain action with xdotool if the window is not visible to the user, this includes minimized windows, but also windows which are 100% covered by other windows (if no ...
8
votes
3answers
6k views

How can I automate window tiling with a custom width? (Cinnamon)

I am running Linux Mint 17 Cinnamon 2.4.8. I really like xdotool, but it conflicts with Cinnamon's awesome snapping/tiling feature. If I run the following command, it does NOT work if the current ...
7
votes
1answer
7k views

emulate key-combination with xdotool

I am using Xephyr as a nested X server. When I am in Xephyr window and pres the key combination Control_L+Shift_L, Xephyr grabs my input (mouse, keyboard). This grab can be released with Control_R+...
8
votes
1answer
12k views

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.
7
votes
1answer
3k views

Resizing a maximized window from the command line

The following script fails to resize an already maximized window: wmctrl -i -r :ACTIVE: -b remove,maximized_vert,maximized_horz xdotool windowunmap --sync xdotool windowmap --sync wmctrl -r :ACTIVE:...
0
votes
1answer
143 views

How can I forward global hotkeys to a program that only listens when the window is in focus?

Let's say there is a program (like OBS, Chrome, or Discord) that accepts hotkeys (to open, save, print, etc) how can I forward a global hotkey like those configured in i3 to a program that only local ...