Inspired by Favorites Launcher.
USAGE:
After build/install restart KDE (re-login).
Left click on desktop -> Default Desktop Settings -> Mouse Actions
From the drop-down list select Command Launcher.
Click its configuration button and type in a command.
This will be executed directly.
Mark an "Execut via 'bash -c'" to run via bash.
EXAMPLE:
1. Assign the following to the selected mouse button to run "Present Windows" effect:
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut ExposeAll
2. Assign the following to the selected mouse button to run "Desktop Grid" effect:
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut ShowDesktopGrid
3. Cube fans can use:
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut Cube
BUIL

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
make
INSTALL:
sudo make install
Note:
It might build against lower KDE version that 4.12, edit it in CMakeLists.txt.
Since I tested with 4.12 I put this version there.
Ratings & Comments
2 Comments
Looks cool but the name should really reflect better what this plugin is. Something like "Desktop mouse plugin Command Launcher". Not so nice but very informative. :)
Yes, could be, I simply used other plugin name convention.