Questions tagged [xdotool]

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

36 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
1k views

More than one WIDs associated with "Chrome" and with "evince"?

I am running Google Chrome browser with 17 tabs. $ xdotool search --name "Google Chrome" 79691777 Why does the following return 7 WIDs? 7 doesn't match any of the fact that I have 17 tabs in a ...
6
votes
1answer
1k views

xdotool and xbindkeys

I have an Acrobat reader that does not zoom on Control+plus but rather on Control+acute (Control-plus annoyingly rotates the document). I would like to fix this using xbindkeys and xdotool but the ...
5
votes
1answer
764 views

XDoTool Command to Wait For Process to End

I use the program VisiPics to delete dupicate pictures. The processing time for deletion varies dependent on the number of pictures and duplicates. I created an Xdotool command to carry out certain ...
4
votes
0answers
364 views

A shrug ¯\_(ツ)_/¯ in awesome key bindings

This is the code I currently have: -- Silly shrug emoji. awful.key({ modkey }, "F12", function () awful.util.spawn("xdotool getactivewindow type '¯\\_(ツ)_/¯'", false) end, {...
3
votes
0answers
1k views

Keyboard shortcut to open a new terminal if one doesn't exist on this desktop. Otherwise, focus the current one

I would like to create a keyboard shortcut that will open a new terminal window only if none exists on the current desktop. Otherwise, the currently existing one will be focused. I just upgraded from ...
3
votes
0answers
1k views

How to detect whether a window is in focus?

I'm not experienced in scripting but I've made this script: #!/usr/bin/env bash # hint: use "xdotool getmouselocation" to get values if xdotool getwindowfocus getwindowname | grep -Eq " - ...
2
votes
0answers
92 views

Unable to send keypress to Xvfb display using XTestFakeKeyEvent in C

Using this short snipped of code I am able to capture events from the keyboard (/dev/input/event1) and print them properly. However, sending them to the Xvfb display using XTestFakeKeyEvent does not ...
2
votes
0answers
103 views

key binding running xdotool unexpected behaviour

I've programmed a key to run xdotool when it's pressed. But for some unknown reason xdotool is only sending keystrokes when the binded key is released, except when a non-active window is sent the ...
2
votes
0answers
524 views

xdotool and new terminal windows

I recently discovered the amazing xdotool command and was going to make a bash-script to open four windows, resize, and reposition them for work. Before, I could use the command xdotool key ctrl+...
2
votes
0answers
1k views

Eliminate xdotool delay?

I have assigned the key F2 to the command bash -c "sleep 0.1;xdotool type --clearmodifiers $(date +%Y%m%d%H%M%S)" There is a delay of half a second (not because of the sleep 0.1 command that should ...
2
votes
0answers
482 views

How to launch an application as a dock on openbox

If i do obxprop|grep dock and click on gnome-panel for example, my result is : _OB_APP_TYPE(UTF8_STRING) = "dock" For the rest, it's : _OB_APP_TYPE(UTF8_STRING) = "normal" How can i force a ...
2
votes
0answers
272 views

keyboard shortcut for inserting text

how to set a keyboard combination for inserting special string in current window at current position? for example, when I'm on Firefox address bar, or Chrome address bar, and press Alt+Ctrl+N it ...
1
vote
1answer
38 views

How do you make a Bash script repeatedly run while holding down left mouse button?

So, I have a command (xdotool click --delay 40 1) I'm using to repeatedly click the left mouse button. As of now, the script is set up like this: mouse="$(xinput --list | awk -F 'id=|\\[' '/mouse|...
1
vote
0answers
77 views

Kwin, xdotool, and wmctrl

I have been trying to do something similar to what described in this thread and create commands to arrange windows in KDE beyond the quicktile functions currently available. I love them, but they are ...
1
vote
1answer
163 views

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 ...
1
vote
0answers
176 views

xdotool not bringing active window in front while VLC is fullscreen

VLC media player has two options to show video in fullscreen. The first is called "fullscreen mode" F11 shortcut and the second is "fullscreen" with "f" shortcut. Both modes appear the same, but the ...
1
vote
0answers
821 views

XBindkeys and Mouse key's giving keyboard numbers (0-9)

XINPUT ➜ xinput --list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ ...
1
vote
1answer
799 views

how to determine in what viewport (compiz/unity) a window is placed?

I am writing a script that requires determining in what viewport a window is placed. My desktop is 2x2 (4 viewports); it is usually thought as being 4 virtual desktops but on compiz/unity, it is ...
0
votes
1answer
34 views

Is it possible to get the screen/monitor name where a specific application is displayed on?

I would like to find out what screen/monitor (not desktop) a GUI application is displayed on. For example: my mail client is running on my third desktop, which is displayed on my second monitor ("...
0
votes
0answers
24 views

Xdotool script not working if called from i3

I have a script for scrolling looking like this xdotool key --clearmodifiers Up Up Up Up It works perfectly fine if I am in a browser and execute it via dmenu using an i3 bindsym. However, it does ...
0
votes
1answer
65 views

xdotool not working over AWS ubuntu instance

I am working on bash script to automate w3m browser using xdotool I hosted this script in aws ubuntu instance but when i am executing this script i am getting below error Error: Can't open display: (...
0
votes
0answers
25 views

xdtool, not working intermittedly when ran inside of a vmware vm in a Windows host

I originally posted on superuser, so my apologies if that is bad form. I was unsure exactly where to post this question. So I have a small gui program I need to automate as part of a build process. I'...
0
votes
0answers
21 views

Capturing mouse position while moving a window

As you can see from my question I want to be able to be able to track the mouse position when it is moving a window. I am able to map the mouse position fine with xdotool but whenever I go to move a ...
0
votes
1answer
77 views

xdotool not working with sxhkd?

ctrl + 2 xdotool type Test Message Added the above line to sxhkdrc with no effect. Using different commands works, but for some reason any xdotool command doesn't work... If i run that command in ...
0
votes
1answer
202 views

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 ...
0
votes
0answers
87 views

xdotool --sync no longer working as intended

I have used the following script for a long time and it always worked, I add a shortcut to it and repeatedly press the bound key and it clicked between two positions in the screen as expected. But ...
0
votes
1answer
141 views

How can I search, highlight and click with xdotool in Chrome?

I need to click a string of text hundreds of times, and the text moves around. Let's say that the string is FOO. This is what I have: xdotool key ctrl+f xdotool key f xdotool key o xdotool key o ...
0
votes
0answers
92 views

xdotool only works in browser

I am trying to map a custom keyboard shortcut in Pop_OS! to issue some other keypresses, but I have gotten part of the way with xdotool but I still have some issues as it wont work in applications ...
0
votes
0answers
465 views

Release modifier keys after using xdotool

I use the following command in a bash script file: xdotool type --clearmodifiers $(xclip -o -sel c) I invoke it with a shortcut such as CTRL+SHIFT+e The action works as expected. However, after it ...
0
votes
0answers
126 views

xdotool send keystroke even when windows does not have focus

I've written the attached script in order to keep my external monitor alive while I'm not typing on it. I'm using fvwm, and have multiple named windows open. The script successfully types A every ...
0
votes
2answers
70 views

Trigger a certain key combo with another one

Can anyone suggest me on what would be the best way to trigger a certain key kombo with another one. Say, I'd like to send CTRL+= while pressing CTRL+[. Basically I want to workaround zoom for Google ...
0
votes
1answer
192 views

xdotool type and stty occasionally cut off first letter of input

I defined a simple function prepend (below) that should automatically place a repeated term of a bash command in the following input prompts. For example, by typing prepend git in the terminal, all ...
0
votes
1answer
364 views

Why do `xwininfo` and `xdotool` give me different window ids?

In a tab of a terminal emulator (lxterminal), I try to find out its window id by clicking in the tab and the process which "owns" the window (I am still not sure what is the word to describe the ...
0
votes
0answers
124 views

linux mint xdotool type web link

I am trying to use xdotool to type a URL and instead of: https://www.sample.com/sales/search?facet=T&facetT=45259587&facet.T=44143327&facet.T=25866782&facet.T=260287 I get: https;/...
0
votes
1answer
896 views

Can't get x forwarding to work with android

I'm trying to send keystrokes from my android to my Retropie using ssh. After a lot of searching I found that I have to use ssh with the -X flag which was already a hassle as most apps don't support ...
0
votes
1answer
3k views

Install problem for xdotool

Since I have problems with my Internet connection I'm not able to always run command apt-get install xdotool in Terminal, so I would like to download the xdotool package manually from website in .zip ...