Questions tagged [xdotool]

xdotool is a command-line tool to automate GUI tasks such as window manipulation. It can simulate key presses and mouse clicks.

Xdotool is a command line utility that can automate GUI tasks such as focusing and moving windows, switching between desktops, and sending key presses and mouse clicks to windows programmatically.

Official links

175 questions
32
votes
1 answer

xdotool: what are "class" and "classname" for a window?

In light of https://unix.stackexchange.com/a/254854/674 and https://unix.stackexchange.com/questions/458895/how-can-i-bring-a-background-gui-job-to-the-front-of-my-desktop, there is an example from manpage of xdotool # Activate google-chrome when…
Tim
  • 24,657
  • 62
  • 151
  • 245
30
votes
4 answers

Equivalent to xdotool for Wayland

I'm looking for a solution working in Wayland to get mouse position, move it and click inside a bash script, all things xdotool can do for X server. xdotool getmouselocation is still working, but xdotool mousemove xdotool click have no impact…
mxdsp
  • 3,798
  • 2
  • 29
  • 53
28
votes
10 answers

How can I run a program on startup, minimized?

I just want Telegram to be run and I have added it to startup apps. The point is that I need it to be minimized. Any commands?
nermitt
  • 382
  • 1
  • 3
  • 9
23
votes
4 answers

How do I permanently change window titles?

Which files are involved in generating the window title? For example, if you open Rhythmbox, you see the program name as the window title. But it’s not generated by the .desktop file. Which file(s) do I need to edit to add text to the title of an…
Maud Kon
  • 541
  • 1
  • 4
  • 18
17
votes
2 answers

Can I minimize a window into a box on Unity?

On Irix's 4Dwm, there was an ability to minimise windows into a box (contrary to the task bar used by modern window managers). I have seen this also on an old HPUX. See the "console" square in the linked image: Is it possible to accomplish on…
Artium
  • 313
  • 1
  • 7
17
votes
4 answers

How to map modifiers (e.g. CTRL) to mouse thumb buttons using xbindkeys

This question has already been asked but was never answered properly. After clearance with @Seth I am now asking it again. This will allow me to respond and possibly modify the question a lot easier. The original question can be found here: Map Ctrl…
conceptdeluxe
  • 315
  • 2
  • 11
16
votes
3 answers

How to create a shortcut that executes an xdotool command to simulate a key press?

I'm trying to simulate a media key press using a custom shortcut. So far, I've been able to achieve the simulation I need using the command: xdotool key XF86AudioPlay It works perfectly, it pauses or starts the music player every time it is…
Jorge Cuevas
  • 275
  • 1
  • 2
  • 7
15
votes
4 answers

Create a custom shortcut that types clipboard contents

I want to simulate keyboard input so that I can "paste" my clipboard contents to applications that don't allow it (e.g. remote KVM). Right now, I'm trying to use xdotool and xclip: xdotool type "$(xclip -o)" This command works if I stay in a…
blee
  • 549
  • 2
  • 5
  • 17
15
votes
1 answer

How to determine if window is maximised or minimised from bash script

I have a bash script that moves my windows from the left screen to right screen in dual-screen setup. Currently the way it works is cycling through the window ids that are given by xdotool search --onlyvisible --maxdepth 2 --class "" and then moves…
v010dya
  • 1,452
  • 2
  • 18
  • 37
13
votes
2 answers

Why does my xdotool key command not work?

I'm trying to run this command: xdotool key ctrl+super+d It is supposed to toggle-show desktop, but it won't work. When I press the keys myself it works though.
Iman Mohamadi
  • 2,695
  • 3
  • 14
  • 19
13
votes
6 answers

Xbindkeys won't work properly

I have bit of a problem. I wanted to remap some hotkeys I am used to from my previous system but I can't get it to work properly with xbindkeys. xbindkeys recognizes the combination but somehow the command does not trigger. If I use the…
Ello
  • 271
  • 1
  • 2
  • 9
12
votes
2 answers

Run several xdotool commands in one line separated from each other

I'm trying to run xdotool type word then xdotool key Return from Startup Aplications Preferences. But if I use && or ;, xdotool evaluates it as continuation of input.
janot
  • 1,601
  • 3
  • 21
  • 34
10
votes
2 answers

How to make xdotool type Unicode characters

I'm trying to make a shortcut to send, for example, the universal quantifier symbol, ∀ (U+2200). Xdotool's own documentation doesn't really explain this.
wjandrea
  • 14,109
  • 4
  • 48
  • 98
10
votes
1 answer

Can xdotool position the mouse relative to current location?

Is there any way of choosing not a screen location, but a location relative to where it is? For example, it could be xdotool mousemove +5 +0 Does this exist?
Tim
  • 32,274
  • 27
  • 118
  • 177
9
votes
1 answer

Get word under cursor in X11

For some scripting, I need to get the word currently under the cursor. Can xdotool or a similar tool get it?
user423626
1
2 3
11 12