By default, Xdotool looks for windows that match any condition, the default condition being --name --classname --class
, thus these equivalent commands get all windows whose title, instance or class contain "foo":
xdotool search foo
xdotool search --name --classname --class foo
In the maintainer's words,
It's a bit confusing, I'm sorry.
The --all
and --class
[and --name
and --classname
] flags act as switches and do not take arguments.
You can, however, use command chaining to do what you want:
xdotool search --name Password search --classname Firefox
The windows matched by the first search
are "piped" onto the second search
command.
Bear in mind:
--name
matches the window title, as in WM_NAME
or _NET_WM_NAME
in Xprop's output.
--classname
matches the first WM_CLASS
string in Xprop's output.
--class
matches the second WM_CLASS
string in Xprop's output.