The virtual desktop pager offers two options for behavior when the current desktop is clicked: do nothing, and show desktop. This request is for a third radio button with a text entry field to run any entered command when the current desktop is clicked. The most obvious use case would be: qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut ShowDesktopGrid In fact, I'd be happy if just a hardcoded option for that action were added -- but allowing arbitrary commands is more flexible. I'll leave it to the implementers to decide which makes more sense, but I do think one of them should be added.
I think that a middle click would also be nice.
I'm not adding UIs to run shell scripts into any places in the UI. Note the virtual desktop is an exposed property on the root window. You could write a program to monitor when that changes.
(In reply to David Edmundson from comment #2) > I'm not adding UIs to run shell scripts into any places in the UI. > > Note the virtual desktop is an exposed property on the root window. > You could write a program to monitor when that changes. To be clear, none of this request is about taking action when the VD changes, so I don't get what you're saying at the end there. Also there are other places where arbitrary commands are supported (clipboard actions, custom shortcuts, autostart, etc.) so your rationale is not obvious. Does this mean you also will never add the ability to trigger ShowDesktopGrid by clicking on the current VD in the pager, as specified in the report? Would you care to write here your rationale for refusing each of these?
I suggest to report your actual wish (showing the grid when clicking on the pager) without mentioning external commands.
At this point the third party script called Parachute, while buggy, provides a much better experience than either Present Windows or Desktop Grid for me, and so ideally clicking the current VD in the pager could trigger Parachute. This report is now my "actual wish."