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

178 questions
39
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,988
33
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
  • 26,107
32
votes
12 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?
24
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
  • 561
19
votes
5 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
  • 589
18
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…
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
  • 333
17
votes
5 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…
16
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,502
14
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.
14
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,790
14
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
  • 281
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,504
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
  • 33,500
9
votes
1 answer

How to set cursor position with command/script?

I have a script which resets some things, and at the end of it I need it to set the cursor to certain coordinates, either to a custom set or to the centre of the screen (where it is reset to by default when restarting gnome-shell for instance). How…
user364819
1
2 3
11 12