Announcement

Collapse
No announcement yet.

terminal command for showing desktop grid

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] terminal command for showing desktop grid

    So I know that ctrl+F8 brings up the Desktop Grid, but I'm looking for a terminal command that does the same, so that I can add an icon for it on a desktop panel.

    Anyone know what that command would be?
    I run Kubuntu 18.04 LTS.

    #2
    Code:
    qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut ShowDesktopGrid

    Comment


      #3
      Uh, that doesn't work for me... If it matters, I'm running 10.04, KDE 4.4.5. Do you have another command? Thanks for your help.
      I run Kubuntu 18.04 LTS.

      Comment


        #4
        Don't have a machine with anything that old. Let's try to discover it. This will take a few iterations of the qdbus command.

        Please show the output of
        Code:
        qdbus org.kde.kglobalaccel
        and
        Code:
        qdbus org.kde.kglobalaccel /component/kwin

        Comment


          #5
          How did you test the first command -- did you type it at a command prompt, or try to script it?

          I created the following script:
          Code:
          #! /bin/sh
          qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut ShowDesktopGrid
          and named it ~/grid.sh. I ran
          Code:
          chmod a+x ~/grid.sh
          to make it executable. Then I right-clicked on my desktop (configured in Folder View mode) and chose Create New -> Basic Link to File or Directory. I filled in the form like so:



          The "File Name" is actually the icon name. Now there's an icon on my desktop, and when I click it, the grid appears.

          Comment


            #6
            qdbus org.kde.kglobalaccel returns the following in a terminal

            Code:
            /
            /KDebug
            /MainApplication
            /component
            /component/amarok
            /component/kded
            /component/khotkeys
            /component/klipper
            /component/kmix
            /component/krunner
            /component/kwin
            /component/kxkb
            /component/plasma_desktop
            /component/yakuake
            /kglobalaccel
            ================================================== ===============

            qdbus org.kde.kglobalaccel /component/kwin returns the following in a terminal

            Code:
            property read QString org.kde.kglobalaccel.Component.friendlyName
            property read QString org.kde.kglobalaccel.Component.uniqueName
            method bool org.kde.kglobalaccel.Component.cleanUp()
            method QStringList org.kde.kglobalaccel.Component.getShortcutContexts()
            method bool org.kde.kglobalaccel.Component.isActive()
            method QStringList org.kde.kglobalaccel.Component.shortcutNames()
            method QStringList org.kde.kglobalaccel.Component.shortcutNames(QString context)
            method bool org.kde.kglobalaccel.Component.showKCM()
            method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
            method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name)
            method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
            method QString org.freedesktop.DBus.Introspectable.Introspect()
            Last edited by SteveRiley; Mar 17, 2013, 11:42 PM. Reason: Added CODE tags to output
            I run Kubuntu 18.04 LTS.

            Comment


              #7
              Originally posted by Steve
              How did you test the first command -- did you type it at a command prompt, or try to script it?
              So I have two panels--my "taskbar" on the bottom of the screen and a panel of icons that are links to applications on the top of my screen. I created an extra dummy icon on the top panel, went into the settings for that icon and changed the associated command to the one you provided.
              I run Kubuntu 18.04 LTS.

              Comment


                #8
                Thanks for taking the time on this, Steve.
                I run Kubuntu 18.04 LTS.

                Comment


                  #9
                  If you type the command
                  Code:
                  qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.shortcutNames
                  qdbus will output all the shortcut names that KWin knows about. It's a long list, so you can pipe it through grep to search for the one of interest:
                  Code:
                  steve@t520:~$ [B]qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.shortcutNames | grep ShowDesktopGrid[/B]
                  ShowDesktopGrid
                  Based on your description in #7, I'm guessing you typed just the one command. Instead, try my suggestion in #5. Create the shell script I provided, mark it executable, and then add an icon to the script.

                  Comment


                    #10
                    So I see. I was able to configure it to my liking. Thanks for your help!
                    I run Kubuntu 18.04 LTS.

                    Comment


                      #11
                      Glad you got it working. And the question was an opportunity for me to start learning about qdbus, too. Heh.

                      Comment


                        #12
                        Originally posted by SteveRiley View Post
                        Glad you got it working. And the question was an opportunity for me to start learning about qdbus, too. Heh.
                        You can do some pretty amazing things with qdbus. I'm trying to program an Amarok 2 remote control with QML on the client side and python on the server side but QML is exhausting. Seriously, there is no built-in access to QT classes!

                        Comment

                        Working...
                        X