OS: Ubuntu 18.04
Say I have the following five open windows with mozilla in their title:
$ wmctrl -lx
0x03e00018 0 Navigator.Firefox kububb Ubuntu Manpage: xdotool - command-line X11 automation tool - Mozilla Firefox
0x05a00003 0 leafpad.Leafpad kububb mozilla1.txt
0x05e00003 0 mousepad.Mousepad kububb mozilla2.txt - Mousepad
0x06000005 0 kate.kate N/A mozilla3.txt — Kate
0x06400093 0 gedit.Gedit kububb mozilla4.txt (~/Desktop) - gedit
man xdotool
has this in the WINDOW COMMANDS section:
search [options] pattern
Search for windows with titles, names, or classes with a regular expression pattern.
and this:
–name
Match against the window name. This is the same string that is displayed in the window titlebar.
Is it possible to exclude only the first entry, the Firefox one?
If I run
xdotool search --name mozilla
five identifiers are listed. How can I list just the four mozilla*.txt ones?
Best Answer
Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. Ex. given
then
or