File: FAQ.md

package info (click to toggle)
xdotool 1%3A3.20160805.1-5.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 944 kB
  • sloc: ansic: 5,587; ruby: 1,062; sh: 316; makefile: 263
file content (40 lines) | stat: -rw-r--r-- 1,196 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# FAQ

## Can `xdotool` work with hexadecimal window IDs?

Yes. You can easily check this, by using `wmctrl` as
an alternative way to obtain a window ID in hexadecimal.

This will show the window ID in hexadecimal of
a window with title `My dialog title`:

```
wmctrl -l | egrep "My dialog title" | cut -f 1 -d ' '
```

I got the value of `0x02800003` displayed on my screen, 
but you will probably have a different value.

Feeding that hexadecimal value to `xdotool` does activate the window:

```
xdotool windowactivate $(wmctrl -l | egrep "My dialog title" | cut -f 1 -d ' ')
```

## How to let `xdotool` work with Qt applications?

`xdotool` can unsually extract the ID of a Qt application 
from its window title, as shown by 
[this StackOverflow question](http://stackoverflow.com/questions/37050159/xdotool-cannot-find-qt-application-window-where-wmctrl-can).

If something is wrong, a workaround is to use `wmctrl`
to obtain the window ID:

```
xdotool windowactivate $(wmctrl -l | egrep "My dialog title" | cut -f 1 -d ' ')
```

Replace 'My dialog title' for the window name you are looking for.

Note that `wmctrl` displays the window ID in hexadecimal. This is no
problem for `xdotool`!