Is it possible to identify windows using regular expressions in xdotool?Cursor positioning using mouse in bash possible?Using xdotool to count number of tabs in gnome-terminalcopy/move multiple files using cp/mv without using regular expressionsxdotool - how do I select text using shift+Home or shift+End?Let xdotool type some text using a different keyboard layoutType in gedit using xdotool in a scriptXdotool does not minimize terminal window when using in Startup Application when pc boots?Extract a number in a txt file by using regular expressionsSetting terminal window's title: wmctrl versus xdotool

Is it unsafe to remove one stud from a load bearing wall?

Will a nuclear country use nuclear weapons if attacked by conventional means by another nuclear country?

What was the first operating system that supported preemptive multitasking?

Check the validity of a 10-digit telephone number

MS in Mathematics, having trouble finding work outside teaching algebra

What deck size is ideal?

Surfacing out of a sunken ship/submarine - Survival Tips

Is it possible to write a short story in 500 words?

Bash to check if directory exist. If not create with an array

Hands-on murderer

Does a motor suffer damage when resistance to the intended motion is met?

Why do three series connected 1.2 V NiMH batteries read 4.16 V when charged?

Improving the observation skill & making less blunders

CO₂ level is high enough that it reduces cognitive ability. Isn't that a reason to worry?

A professor commented that my research is too simple as compared to my colleagues. What does that mean about my future prospects?

Language to define perfectly a programming problem

Are there "fewer independent theaters than ever"?

Google just EOLed the original Pixel. How long until it's a brick?

Do Macs come with any programming language available from the Terminal?

What's the name of the role of characters who buff teammates?

Is current polling about Democrats lead over Trump trustworthy?

Fermat's Last Theorem, mod n

Physical interpretation of complex numbers

Legality of reading unpaid e-book (ex. from genlib/sci-hub)



Is it possible to identify windows using regular expressions in xdotool?


Cursor positioning using mouse in bash possible?Using xdotool to count number of tabs in gnome-terminalcopy/move multiple files using cp/mv without using regular expressionsxdotool - how do I select text using shift+Home or shift+End?Let xdotool type some text using a different keyboard layoutType in gedit using xdotool in a scriptXdotool does not minimize terminal window when using in Startup Application when pc boots?Extract a number in a txt file by using regular expressionsSetting terminal window's title: wmctrl versus xdotool






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0

















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?










share|improve this question





















  • 1





    Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. So for example 'mozilla.+.txt' or 'mozilla[0-9].txt'

    – steeldriver
    Jul 19 at 14:47












  • Both work just fine!

    – DK Bose
    Jul 19 at 15:03











  • OK in that case I will add it as an answer

    – steeldriver
    Jul 19 at 15:13

















0

















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?










share|improve this question





















  • 1





    Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. So for example 'mozilla.+.txt' or 'mozilla[0-9].txt'

    – steeldriver
    Jul 19 at 14:47












  • Both work just fine!

    – DK Bose
    Jul 19 at 15:03











  • OK in that case I will add it as an answer

    – steeldriver
    Jul 19 at 15:13













0












0








0








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?










share|improve this question















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?







command-line xdotool






share|improve this question














share|improve this question











share|improve this question




share|improve this question










asked Jul 19 at 14:10









DK BoseDK Bose

21.1k14 gold badges59 silver badges122 bronze badges




21.1k14 gold badges59 silver badges122 bronze badges










  • 1





    Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. So for example 'mozilla.+.txt' or 'mozilla[0-9].txt'

    – steeldriver
    Jul 19 at 14:47












  • Both work just fine!

    – DK Bose
    Jul 19 at 15:03











  • OK in that case I will add it as an answer

    – steeldriver
    Jul 19 at 15:13












  • 1





    Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. So for example 'mozilla.+.txt' or 'mozilla[0-9].txt'

    – steeldriver
    Jul 19 at 14:47












  • Both work just fine!

    – DK Bose
    Jul 19 at 15:03











  • OK in that case I will add it as an answer

    – steeldriver
    Jul 19 at 15:13







1




1





Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. So for example 'mozilla.+.txt' or 'mozilla[0-9].txt'

– steeldriver
Jul 19 at 14:47






Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. So for example 'mozilla.+.txt' or 'mozilla[0-9].txt'

– steeldriver
Jul 19 at 14:47














Both work just fine!

– DK Bose
Jul 19 at 15:03





Both work just fine!

– DK Bose
Jul 19 at 15:03













OK in that case I will add it as an answer

– steeldriver
Jul 19 at 15:13





OK in that case I will add it as an answer

– steeldriver
Jul 19 at 15:13










1 Answer
1






active

oldest

votes


















1


















Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. Ex. given



$ wmctrl -ilx | grep brave
0x04000001 0 brave-browser.Brave-browser t400s Newest Questions - Ask Ubuntu - Brave
0x040000fe 0 brave-browser.Brave-browser t400s file2.txt - Brave
0x040000ff 0 brave-browser.Brave-browser t400s fileA.txt - Brave


then



$ xdotool search -name 'file.+.txt'
67109118
67109119


or



$ xdotool search -name 'file[0-9].txt'
67109118





share|improve this answer



























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1159474%2fis-it-possible-to-identify-windows-using-regular-expressions-in-xdotool%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown


























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1


















    Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. Ex. given



    $ wmctrl -ilx | grep brave
    0x04000001 0 brave-browser.Brave-browser t400s Newest Questions - Ask Ubuntu - Brave
    0x040000fe 0 brave-browser.Brave-browser t400s file2.txt - Brave
    0x040000ff 0 brave-browser.Brave-browser t400s fileA.txt - Brave


    then



    $ xdotool search -name 'file.+.txt'
    67109118
    67109119


    or



    $ xdotool search -name 'file[0-9].txt'
    67109118





    share|improve this answer






























      1


















      Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. Ex. given



      $ wmctrl -ilx | grep brave
      0x04000001 0 brave-browser.Brave-browser t400s Newest Questions - Ask Ubuntu - Brave
      0x040000fe 0 brave-browser.Brave-browser t400s file2.txt - Brave
      0x040000ff 0 brave-browser.Brave-browser t400s fileA.txt - Brave


      then



      $ xdotool search -name 'file.+.txt'
      67109118
      67109119


      or



      $ xdotool search -name 'file[0-9].txt'
      67109118





      share|improve this answer




























        1














        1










        1









        Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. Ex. given



        $ wmctrl -ilx | grep brave
        0x04000001 0 brave-browser.Brave-browser t400s Newest Questions - Ask Ubuntu - Brave
        0x040000fe 0 brave-browser.Brave-browser t400s file2.txt - Brave
        0x040000ff 0 brave-browser.Brave-browser t400s fileA.txt - Brave


        then



        $ xdotool search -name 'file.+.txt'
        67109118
        67109119


        or



        $ xdotool search -name 'file[0-9].txt'
        67109118





        share|improve this answer














        Based on a couple of quick tests, it appears to support GNU-style extended regular expressions. Ex. given



        $ wmctrl -ilx | grep brave
        0x04000001 0 brave-browser.Brave-browser t400s Newest Questions - Ask Ubuntu - Brave
        0x040000fe 0 brave-browser.Brave-browser t400s file2.txt - Brave
        0x040000ff 0 brave-browser.Brave-browser t400s fileA.txt - Brave


        then



        $ xdotool search -name 'file.+.txt'
        67109118
        67109119


        or



        $ xdotool search -name 'file[0-9].txt'
        67109118






        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Jul 19 at 15:12









        steeldriversteeldriver

        81.4k12 gold badges133 silver badges219 bronze badges




        81.4k12 gold badges133 silver badges219 bronze badges































            draft saved

            draft discarded















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1159474%2fis-it-possible-to-identify-windows-using-regular-expressions-in-xdotool%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown









            Popular posts from this blog

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

            Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?