How do I programatically move the application window to current desktop?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite
1












In KDE it's really easy to setup window rules to be able to put application windows on specific desktop etc.



But how this can be done programmatically (not via keyboard shortcuts) but via scripting?



Particularly I'm interested to show the ksysguard application window (if it's running) on the current desktop after pressing a keyboard shortcut.










share|improve this question

























    up vote
    0
    down vote

    favorite
    1












    In KDE it's really easy to setup window rules to be able to put application windows on specific desktop etc.



    But how this can be done programmatically (not via keyboard shortcuts) but via scripting?



    Particularly I'm interested to show the ksysguard application window (if it's running) on the current desktop after pressing a keyboard shortcut.










    share|improve this question























      up vote
      0
      down vote

      favorite
      1









      up vote
      0
      down vote

      favorite
      1






      1





      In KDE it's really easy to setup window rules to be able to put application windows on specific desktop etc.



      But how this can be done programmatically (not via keyboard shortcuts) but via scripting?



      Particularly I'm interested to show the ksysguard application window (if it's running) on the current desktop after pressing a keyboard shortcut.










      share|improve this question













      In KDE it's really easy to setup window rules to be able to put application windows on specific desktop etc.



      But how this can be done programmatically (not via keyboard shortcuts) but via scripting?



      Particularly I'm interested to show the ksysguard application window (if it's running) on the current desktop after pressing a keyboard shortcut.







      plasma






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 29 at 6:03









      Te Ri

      419410




      419410




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          wmctrl tool can do this and really easy.



          Prerequisites



          Install wmctrl:



          sudo apt install wmctrl


          Use



          "System Monitor" is the window name of ksysguard tool so we will use it:



          # Switch window's desktop to current and activate that window:
          wmctrl -R "System Monitor"


          To make this even more robust we can use window's WM_CLASS (for ksysguard tool it's ksysguard):



          # Switch window's desktop to current and activate that window:
          wmctrl -x -R ksysguard





          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',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            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%2f1000876%2fhow-do-i-programatically-move-the-application-window-to-current-desktop%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            wmctrl tool can do this and really easy.



            Prerequisites



            Install wmctrl:



            sudo apt install wmctrl


            Use



            "System Monitor" is the window name of ksysguard tool so we will use it:



            # Switch window's desktop to current and activate that window:
            wmctrl -R "System Monitor"


            To make this even more robust we can use window's WM_CLASS (for ksysguard tool it's ksysguard):



            # Switch window's desktop to current and activate that window:
            wmctrl -x -R ksysguard





            share|improve this answer
























              up vote
              0
              down vote













              wmctrl tool can do this and really easy.



              Prerequisites



              Install wmctrl:



              sudo apt install wmctrl


              Use



              "System Monitor" is the window name of ksysguard tool so we will use it:



              # Switch window's desktop to current and activate that window:
              wmctrl -R "System Monitor"


              To make this even more robust we can use window's WM_CLASS (for ksysguard tool it's ksysguard):



              # Switch window's desktop to current and activate that window:
              wmctrl -x -R ksysguard





              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                wmctrl tool can do this and really easy.



                Prerequisites



                Install wmctrl:



                sudo apt install wmctrl


                Use



                "System Monitor" is the window name of ksysguard tool so we will use it:



                # Switch window's desktop to current and activate that window:
                wmctrl -R "System Monitor"


                To make this even more robust we can use window's WM_CLASS (for ksysguard tool it's ksysguard):



                # Switch window's desktop to current and activate that window:
                wmctrl -x -R ksysguard





                share|improve this answer












                wmctrl tool can do this and really easy.



                Prerequisites



                Install wmctrl:



                sudo apt install wmctrl


                Use



                "System Monitor" is the window name of ksysguard tool so we will use it:



                # Switch window's desktop to current and activate that window:
                wmctrl -R "System Monitor"


                To make this even more robust we can use window's WM_CLASS (for ksysguard tool it's ksysguard):



                # Switch window's desktop to current and activate that window:
                wmctrl -x -R ksysguard






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 29 at 6:03









                Te Ri

                419410




                419410



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1000876%2fhow-do-i-programatically-move-the-application-window-to-current-desktop%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491