Questions tagged [xdotools]

23 questions
20
votes
3 answers

Kill the currently active window with a keyboard shortcut

How can I kill the currently active window with a command or keyboard shortcut? Alt+F4 closes a window, but first it will wait for the program to respond. Depending on the application, this may take several minutes. I am specifically interested in a…
13
votes
2 answers

Command-line way to send keystrokes to a window open on a different X-session

On my main machine, I have a Ubuntu desktop open and logged on. I am then also logging in to this machine from a remote computer, using X2go which creates a new X-session. I have a libreoffice file open on the original session. I want to save this…
8
votes
1 answer

How do I unmaximize a window with xdotool or similar by command line?

With xdotool or wmctrl I can move or modify window attributes but if it is maximized none of the commands work. How do I "unmaximize" the window?
BreezyChick89
  • 291
  • 5
  • 15
7
votes
4 answers

Disable numlock, preserving mouse button key bindings

I'm having trouble to disable the Numlock key (make the key do nothing, so that the numpad numbers always work) while at the same time mapping extra mouse buttons (at the side of my mouse) to shortcuts to perform custom actions. I use Arch Linux and…
6
votes
3 answers

xdotool, click and hold and move the mouse

I want to automate a task, I need to scroll a Google like map interface, what I essentially do normally is: Click an a spot Hold the clicking Move the mouse relatively 100 pixels left Stop holding Wait a little, return to 1 However, I tried $…
Mustafa
  • 235
4
votes
1 answer

Linux: command to lower window with focus

I'm looking for a command to lower a window with focus to the bottom of the stack of windows. I have a command to raise a focused window to the top which is: xdotool getwindowfocus windowraise ...but I can't find one that moves the window to the…
sebinho
  • 93
4
votes
1 answer

How to scroll half a page on Linux?

I'm looking for a way to be able to scroll half a page, preferably by using a key combination like shift page up/down. In Windows, this is doable via autohotkey, for OS there does not seem to be any as easy solution as all I found was this. I just…
joelostblom
  • 2,699
  • 4
  • 24
  • 28
2
votes
2 answers

Bash/xdotool: Commands work, but not in a script

I am making a bash script for Linux which closes the terminal window if the window loses focus. On the command line, I was able to do this: termwin=$(xdotool getactivewindow) while : do if [[ $(xdotool getactivewindow) != $termwin ]] then …
2
votes
1 answer

xdotool only works with X11 windows on OSX

I've installed xdotool via MacPorts. It works only with X11 windows. Is there a way to use it for native OSX applications as well?
viam0Zah
  • 2,086
2
votes
0 answers

Command works in terminal but not as a shortcut command

My system: Debian 11 / Xfce To quickly insert the same text in different e-mails, I tried to create a keyboard shortcut using a xdotool type "text" command At first I tested this command in a terminal and I got the text displayed on the terminal…
mazda
  • 477
2
votes
2 answers

Keyboard shortcut for toggle window (activate/minimize)

Based on this answer I can activate or minimalize window: how to bring up keepassX window with keyboard shortcut? xdotool search --onlyvisible --name "My window name" windowactivate xdotool search --onlyvisible --name "My window name"…
mkczyk
  • 755
2
votes
0 answers

xdotool key ctrl+W wrecks my machine

Whenever I'm running the command xdotool key ctrl+W in terminal (Arch Linux), it closes all its tabs and my Chromium app too, and I can only recover from it with reset button (can't reopen terminal, as if it's endlessly pressing ctrl-W). Does anyone…
1
vote
1 answer

How can I permanently rename a window (in XFCE)?

I tend to have a bunch of windows of the same applications (terminals and text editors) and they can be a problem to manage. It would help me a lot if I could give them the most intuitive and clear names. I found how to do it working directly with…
Jk041
  • 111
1
vote
0 answers

Query value of button with current focus (together with xdotool) from the command line

I am using xdotool to automate some GUI usage. That works pretty well, but sometimes I want to check what button currently has focus. I need to query the value of that button. xdotool doesn't seem to support that (can only get window titles). Is…
medihack
  • 940
1
vote
0 answers

Xdotool --window function not registering

I've bashed my head against this problem for a while and I'm at a dead end. I'm simply trying to send one key input to an unfocused window using the xdotool key --window window_id function. The window is found, but nothing registers. To simplify: I…
weons
  • 11
1
2