In my never-ending pursuit of command-line-related tricks, I tend to gloss over the GUI.
That is a mistake that I tend to begin remedying today, with the introduction of Krunner.
By introduction, I don’t mean to say that Krunner is new, but that’s it new to me.
And by that, I don’t mean to imply that I’ve never heard of or seen it before — because I have — but that I never actually paid it any mind.
On a whim, I began to research what exactly it can do.
It has my attention now.
Krunner is a KDE Plasma search utility and launcher, meaning that it can find files and applications and launch them with a minimum of (your) effort wasted.
Not only that, but it can open websites, run commands, be used as a calculator, a task manager, and more.
The results of my research and testing (because I don’t believe everything I read!) leads me to believe that I will be making better use of Krunner in the future, now that I know how useful it can be.
Krunner
Use the keyboard shortcut Alt + F2 or Alt + Space to bring up Krunner on the top middle of your screen.
(You can also right-click on your desktop and select “Run Command…”, but where’s the fun in that?!)
The interface in minimal, featuring a search bar in between two buttons — Settings on the left and Close on the right.
The settings allow you to Clear History and to select/deselect “search plugins”, which is how/where you can enable or disable various features and search locations that Krunner utilizes.
My search plugins were all selected by default, so I was good to go!
Searching & Launching
To find something — anything — I simply start typing. By the time I have typed in a single letter, I’m already seeing suggested results, ranging from System Settings and Applications that match my criteria, to my recent Documents… even those documents that contain my criteria inside and not just in the file name.
Simply click on (or scroll down and hit Enter on) the result that you want, or continue refining your search until you find what you’re looking for.
Alternatively, type in the prefix “file:” along with a file name in your home directory, or include the path to the file with the file name, and the file will open when you hit Enter.
Krunner is a keyboard-shortcut-instigated quick-and-easy way of starting (launching) applications and opening files.
Nifty.
You can also launch websites by typing/pasting in a URL; it will be launched in your default browser.
Use “gg:
Closing Applications
I usually use the command line to close (kill) applications that have frozen up or are otherwise not behaving as they should — ahem! — but Krunner provides an alternative.
Using the kill command via the command line, I have to first figure out the application’s process ID, then execute the kill command.
With Krunner, simply typing in “kill
I tested this on an application that was functioning normally (because evidently applications don’t freeze up and malfunction, just because you want them to for testing purposes!) and found it to be a quicker — if somewhat less geeky — alternative to the command line.
Switching Applications
Open Krunner and start typing in a window name, to select and switch to that window without touching your mouse.
This is especially useful when you have too many windows open to read them all and remember their order, but know the name of the window you want to open — it save a lot of clicking around.
You can switch between activities and virtual desktops (both are topics that I hope to cover very soon) in the same manner.
Krunner can also be used to create new desktop sessions (type in “new session”) or switch between desktop sessions (type in “switch”). We’ll get into desktop sessions at a later date also!
Impromptu Command Prompt
Krunner can run commands, but won’t take you to the command prompt to see results/confirmation/output/etc.
In many cases this defeats the purpose of the command line altogether, so I’ll probably be sticking to using Krunner to open Konsole, and running my commands directly from the command line as usual.
Calculating and Converting
Now this is something that I really wish I had known sooner!
Krunner can act as a simple calculator, providing answers to things like “33*9234” (which is what happened when I randomly hit a bunch of keys) and more. (The answer, BTW, is “304722”.)
For some calculations, you may need to begin with an equal sign to help clue the calculator in that it’s needed. For example, =5*x=830 will be calculated, but 5*x=830 will not.
Calculations beginning with scientific functions such as cos(), log(), sqrt(), sin(), etc. will also need preceded by an equal sign.
Krunner can also act as a conversion tool, so if you type in “25kg”, for example, you’ll see its equivalent in tons/grams/milligrams/pounds/ounces, and if you type in “26C” (for Celsius), you’ll see the equivalent in Kelvin and Fahrenheit.
And just to think, I’ve doing all these conversions the hard way… when Krunner was right there in front of me all this time!
Spell-checking
I’m reading all over the place that Krunner acts as a spellchecker, but can’t get it to show any signs of spell-checking.
Any suggestions?
I’m beginning to think that this feature has been removed in recent versions!
Networking
I have not had time to explore much of the networking-related features that Krunner is supposed to include.
Services such as SMB, SFTP, and VNC are supposed to work directly from the Krunner interface.
If you’ve tested these on a current version of KDE and feel like sharing, let me know!
Conclusion
I haven’t yet gotten over how mad I am with myself that I never explored Krunner before, so before I make the same mistake all over again, let me know in the comments if you know of another under-utilized and under-appreciated feature of KDE; I’ll drop everything to tackle it/them right now!
In the meantime, bring up Krunner and start typing things in randomly — there’s more there than I could possibly cover!