Quickly launch any app in KDE with a shortcut
How can you quickly launch an app with an assigned shortcut in KDE?
System Settings → Shortcuts and Gestures → Custom Shortcuts → Edit → New
Solution 1:
Unlock Widgets.
Right-click in launcher and click Edit Applications...
Find the app you want to assign a shortcut
For example: Click on System, and click on Konsole. Click on Advanced Tab. At the bottom you can see Current shortcut key, click on the button and enter the shortcut.
Solution 2:
Just to reiterate what @HeathMatlock suggested:
Then set a Shortcut
under Trigger
, and enter a Command
under Action
.
If you're not sure what the command is, maybe try:
xprop _NET_WM_PID | awk '{print $3}' | xargs ps -o comm= -p
and click on the application window. This attempts to grab the PID that created the window and passes it to ps
to see what the command for the PID was. Not 100% reliable for example if your bashrc adds stuff to PATH
you might find the same command won't work as a shortcut.
To run an application only if it isn't already running, I use this:
ps -e | grep mycommand || mycommand