Monday, October 29, 2007

what runners do we need? want? dream of?

i'm looking for feedback on what things you should be able to type into kde 4's run dialog (krunner) and have happen. the mechanism that drives these are little plugins called "runners", which was the origin of the name krunner. that's a bit of a misnomer these days as a done a bunch of other little things too, but it's close enough still.

here are the runners we have so far:


  • calculator: type in numbers, it spits out results

  • search: type in a phrase and it'll search for it using strigi (or, eventually, whatever xesam backend you have)

  • shell: runs shell commands

  • sessions: lists and activates user sessions (ala "fast user switching")

  • services: find applications by data in their .desktop files (so "file manager" might bring up, for instance, dolphin and konqueror)

  • locations: directories, URLs and web shortcuts (e.g. wp:kde)



yes, it's pretty basic at this point. here are additional runners i'd like to see for 4.0:


  • mimetype: give it a local file and it'll list the apps you can open it with



here are additional runners i'd like to see by 4.1:


  • bookmarks: start typing a bookmark title and up it pops

  • contacts: type a name, email/im, phone number, etc and get a list from your address book

  • dates: enter a date, get your schedule ... or the option to add a new item to it?



here are some ideas for runners that i think would be cool:


  • commands: semi-natural language commands like "do foo" where "foo" is an entry you've trained it on, or "new $SOMETHING" where $SOMETHING might be "document" or "spreadsheet" or whatever, or "help kword" might bring up the user manual for kword

  • addresses: enter a street address and get a map?

  • microblog: enter the name of a microblog service, e.g. twitter, followed by a message and have it sent to the service

  • converter: enter something in one set of units, have it converted to another set

  • API docs: enter a class name, get a link to the API docs?



those are just things that occurred to me while writing this entry. i haven't really thought much about it. that's where you come in: what would you like to be able to type into krunner and have happen?

dazzle me with your brilliance and imagination.

63 comments:

Anonymous said...

commands like e-mail someone or call someone
I would also like to type 9 crimes and have the song played

Aaron J. Seigo said...

places: type in the name from the places sidebar in the file dialog or dolphin and have it pop up

we also already have control panel hits in krunner, in case anyone was going to put that one there.

Javier said...

Dictionary and thesaurus would be really nice addons to have; maybe even a translator?

Maarten ter Huurne said...

You already mentioned web shortcuts, but I think it would be nice to have an enhanced version of "gg:" which auto-completes your search query, like the Google box in Firefox.

For the calculator, a unit converter would be useful.

A currency converter would be useful too. I don't know if there is a site that provides this information for free though.

daniel said...

Search META data! Oh I would be so happy if I could tag a file and the tag got indexed too so I could search for things by how I have tagged them. Does strigi even support meta data yet?

Oh Aaron please unleash us from the brutal chains of only being able to search name and text content!

Any ways keep up the good work, I love how KDE 4 is shaping out.

kwilliam said...

You could use the Katapult catalogs for inspiration. (For instance, the Amarok collection song-launcher catalog.) A dictionary would also be nice - some sort of tie in to the dictionary plasmoid perhaps? (Since Kdict is going away ;-( )It would be nice if Krunner could replace Katapult for me.

@ Maarten ter Huurne: Google provides currency conversion.

Aaron J. Seigo said...

> Search META data!

already supported by the search plugin.

> Katapult catalogs for inspiration

yeah, i'm trying to avoid doing research. i'm tapping into the lazyweb instead. =)

i'm also hoping to inspire one or two people "out there" to start thinking about writing runners.

i should write a quick techbase tutorial tomorrow.

Anonymous said...

My main missing "runner" is for shell commands, as i have to write konqueror out, instead of just kon->down-key->enter if i recently used konqueror.

Apart from that, i think having a lot of runners would be really cool, BUT with an UI to enable/disable unique runners and also change their priorities, to be able to decide what you get first, if a query term matches more runners.

--
martin s.

Ismael Asensio said...

A list of not-yet-installed apps which match the input, with the help of the distribution package manager.

Clicking the answer the package manager (yast, adept, etc) would be invoked to install the missing app.

Currently an ubuntu application (don't know if any other distro includes it) does it for the shell and it's a very pleasing way to find out new or missing applications.

Ryan said...

Help/documentation runners:
kde help
gnome help
man pages
info pages
all that good stuff in /usr/share/doc/

Aaron J. Seigo said...

@Ryan: help is already supported if you do help:// or man:// or info:// ... man foo, help foo, info foo would be nice indeed though.

Anonymous said...

I would like to see integrated in krunner. So that I can start e.g. kword with kw[enter].

Jason Stubbs said...

While slightly off topic for this article, I couldn't help but think of Lancelot's search feature while reading over your list of runners.

Have you thought at all about combining the two?

Aaron J. Seigo said...

@jason: there's no reason lancelot couldn't use runners (they are plugins, the loader for them is in libplasma) though lancelot may also just use strigi as well.

so, i'm not sure there's all that much to think about really =)

Anonymous said...

Look at all the google commands, you already have some of them here.
Unit conversion, currency conversion, etc.

http://www.google.com/help/features.html

Leo S said...

The critical feature here is learning. Katapult is (last time I tried it) fundamentally broken, because it doesn't learn which programs you use. Just because I have konquest installed doesn't mean I should have to type konquer before I see konqueror (after the first time of course). So, does Krunner learn which matches you actually use?

Also, care needs to be taken to make results fast. If I know that typing "fi" will get firefox as a first result, I should be able to type fi+enter without even looking. If the result isn't there instantly, it's already only half as useful.

@ismael

With something like a list of not installed packages, you have to be very careful, because that list is massive. It is slow to search, and could pollute the list of results. Care needs to be taken that this list won't be searched in most cases (maybe only if you type install first).

As for other runners, the free form text is very intriguing. I find it would be most useful for searching. The problem with desktop search is that it's a pain to specify additional constraints (need UI to specify everything, which gets cluttered fast).
What I would like is to have some really simple free form searches, like "email from john" or "pdf about kalman filter" or "picture from last november" Of course, natural language processing is very difficult, but I think an adequately intelligent system can be created with just a set of simple rules and alternatives for how someone might specify a query. Google is a good example with their date parsing. They understand a lot of dates expressed in common language, like "next tuesday".

As for other ideas, you pretty much covered the most useful ones. Are these runners plugins in the sense that users can install their own after the fact, or are they built into the system for now? If they are, could they be plugins at some point? Then any cool additions will get made for you.

Anonymous said...

Another thing that could be done (I don't know how technically difficult) is adding search fields from applications assigning them prefixes like "g" for google.
Opera browser has this "g aaron" would google for arron. It'd be cool to type in "kopete: dave" and see the daves on my list.

Essentially enabling users to create their own runners I guess?

Leo S said...
This post has been removed by the author.
ash said...

if we're talking about integration with applications, then google calendar, et. al. -type "breakfast at 0800 on 5th november" should be cool... shouldn't forget that we're writing software for folks who would love a computer to do what they want than trying to figure out how to do it. think on the terms of "send email to nobody@gmail.com" instead of kmail > new > email > to:nobody@gmail.com

my 2c.

great job, keep it up!!

peppelorum said...

ash: with gcalcli that is pretty simple, just add an alias like "alias q = gcalcli quick" and you can add an event with "q dinner at 9 at the local pub".
Got the tip from http://hackaddict.blogspot.com/2007/10/my-new-google-calendar-setup-quick-add.html
Now we just hope that krunner supports alias, if that is needed in this example.

Harri said...

Integration with the kurifilters like gg:.

Another important feature that is still missing compared to the old minicli: a history containing old terms entered.

Niko said...

- Tab-Completion like in bash (for commands not in the history)
- usage of bash aliases

Aaron J. Seigo said...

@javier: "Dictionary and thesaurus would be really nice addons to have;"

would be pretty easy, i suppose; esp as we have a dictionary data engine from plasma that could be used to bring up the defs.

"maybe even a translator"

what would the translator syntax look like?

@marten: "which auto-completes your search query"

this is like the tab completion someone else requested. i really may have to extend the API for this =)

"unit converter would be useful."

i mentioned that one in my blog entry actually =)

@harri: "Integration with the kurifilters like gg:."

already there

"Another important feature that is still missing compared to the old minicli: a history containing old terms entered."

trivial to add and will be there for 4.0.

@niko: - "Tab-Completion like in bash (for commands not in the history)"

it's completely plausible for runners to already return partial matches; but this is one area where it might make sense to extend the api slightly: forward completion.

"usage of bash aliases"

would essentially mean reimplementing the entire aliasing system, or else running a shell process somewhere. multi-shell would also be of interest.

Bruno said...

For the date runnner it would be nice to be able to add fuzzy dates: ie. today, tomorrow, etc.

But that's something we might also want in KOrganizer so maybe in pimlibs

Anonymous said...

Hello,

Jason Stubbs got the point. A lot of runners are tools to find things. It is cool to have in krunner because the way to krunner is very short; I appreciate this, but, in the first place if a new user wants to find something he would use the search tool of his desktop (lancelot).
So I think all the runners which are associated with finding things should also be availabel in lancelot.

I also have an idea for a runner. bibtex is the de facto standard paperdatabase I think. There are tools like kbibtex and kbib which are able to search servers like pupmed or zentralblatt-math.org. I think it would be really nice to have this search feature integrated into krunner/lacelot. The result should open a popup in which one is able to choose the bibtex file in which ne new entry should be added.

Anonymous said...

A mechanism to know what runners are
available. There should be a button
that e.g list all runners.

tmske said...

translator syntax could look like this:

en:nl hello
fr:en bonjour

florisla said...

A really nice example of the power of such a 'runner' framework is Humanized Enso. To me, this could become the PC interface of the 21st century.

There is a good introduction to it on Google Video:
http://video.google.com/videoplay?docid=-6856727143023456694&q=away+with+applications&total=429&start=0&num=10&so=0&type=search&plindex=0

I highly recommend to watch it...

Carlos said...

That all sounds cool, but I'd like to be able to turn on and off each runner because you may get so many options when you're searching for something that you actually get lost.

Kleag said...

Just to add to previous wishes: I'd love to have (auto)completion of in-PATH commands, thus completing mozi into mozilla-firefox.

richmoore said...

Since I changed the calculator runner to use QtScript, extending it to support unit conversions (and lots of other cool tricks) would be very easy.

Anonymous said...

@ Leo S.:

You said: 'Google is a good example with their date parsing. They understand a lot of dates expressed in common language, like "next tuesday"'

Leo, did you know you could do pretty much the same thing with a good ol' GNU tool called "date"?

Try:

date -d "next thursday"
date -d "2 days ago 1 hours ago"
date -d "2 days ago 3 hours ago"
date -d "last year"
date -d "next month"
date -d "next month 2 days"
date -d "next week 2 days"
date -d "next week 2 days 1 hour

echo -n "Next KDE4 Krush Day: " ; date -d "next saturday"

fahterofsamandellie said...

I like the idea of putting in an event in a natural language like "event: meet Tom thurs at 2" and for it to be entered into the organiser.

To be honest I want this feature in Kmail so I can select a part of a message that has a meeting in it, parse it and enter straight to organiser. I need this everyday.

Google calandar has a great natural language event parser.

maxjen said...

A translator would be cool.
In KDE3 you can just type e.g. "en2de:word" and it opens a website with the translation.

Jakob Petsovits said...

shortcut: A runner that provides aliases for other runners.

For example, typing "forum" opens http://www.informatik-forum.at/, "dev1" gives me a Konsole with "ssh -p 12345 jpetso@dev1.zites.net" pre-started, and "felix" invokes the runner that opens a Kopete chat window to my brother (whatever this runner may be).

DanaKil said...

I'd love to see something like :

icq name "my message"
msn name "my message"...

to quickly open a chat window. However, the problem is that the display name can change and typing the email who identifies the contact is difficult. Maybe it is easier to use the custom display name (we can set it in kopete)


Not related but I really like to use the "web shortcut" but the config module is not very adapted. It is not intuitive and it looks like we can only do "web" shortcut with it. Personnaly, I give all my main folders a shortcut like "dd" for "danakil downloads", "dh" for "danakil home"...
This module could have groupable items because most distribution (like kubuntu) put a lot of items here

George G said...

you can count me in at trying my hand at making one or two of these runners that are popular ideas... especially if there's a techbase tutorial about it :)

Anonymous said...

I know its a bit offtopic but what I've always wanted from kde3 "Alt+F2" is the ability to put the text bar on the panel (always visible) and have my shortcut key (alt.f2) focus the widget.

KRunner is powerful enough for me that I dont need the K Menu at all, and I have a very wide screen, so it would make perfect sense to be able to "theme" the runner this way (obviously, the result box would have to pop up above, in case of a bottom panel...)

Michael Rudolph said...

Hi Aaron,
the obvious top dogs in the gclui (graphical command line user interface) game are humanized's enso and blacktree's quicksilver.Both project's lead developers have been featured in Google Talks that can be found on video.google.com.

The best runner, that has not yet been mentioned, would perhaps handle proxy elements, like dolphins current selection, konquerors current webpage, or klippers contents. The usefulness of such a runner of course greatly depends on the actions, that one can use on such objects.

Thanks for your effort.

michael

Troy Unrau said...

I would just like to say that ismail's idea is great, however until we get something that is universally installed (like PackageKit) which uses a standard query API for finding those apps that are not installed, it might not be practical.

However, PackageKit (which uses a DBUS API to wrap all the existing packaging backends) would probably permit this in some fashion. If KDE introduced it as a dependency, it would also trigger more widespread adoption.

Anonymous said...

This is also a bit OT and not that important, but I would like to be able to press enter on the result of an calculation result to have it copied in the lineedit. In KDE3 I use this a lot to base a new calculation on the last result.

Owl said...

Search through my address book, so that if the best match is a name or e-mail address I can hit enter to write an e-mail to them.

colin kern said...

This might be getting too complex, but someone before mentioned learning what you use most often, and I think that can be expanded on even more. The prediction should take into account what programs you currently have running, which one is active, etc. If I've got kopete and firefox running, I'm probably going to want to do different things than if I'm currently running kdevelop and qtassistant.

Anonymous said...

"addresses: enter a street address and get a map?"


Hey, I have a good one, how about
Directions: you get directions to get to your destination given addressess you type in along with a map =)

PS: you trully are "The PlasMan" Aaron

LJ

Aaron J. Seigo said...

@florisla: yeah, i'm familiar with the humanized stuff. of course, i'd prefer not to just clone something, which is why i'm asking for some input from all of you =)

the "command runner" in my blog entry is actually, at least in part, inspired by the humanized stuff.

Aaron J. Seigo said...

@maxjen: "In KDE3 you can just type e.g. "en2de:word"
and it opens a website with the translation."

that still works in kde4, including in krunner.

best yet: from krunner, if you use firefox or some other browser, it still works.

chargen said...

Sleep, Off, Lock, Switch, Help, config would all be nice (essentially commands for the builtin menu options).

Spell would be nice.

The addressbook email feature mentioned sounds good

Aaron J. Seigo said...

@Michael Rudolph: yes, i'm familiar with pretty much everyone else's efforts in this field, from katapult to deskbar to humanized to quicksilver. lots of interesting ideas out there. =)

maxauthority said...

Actually not a real "runner", but since krunner is a seperate process, i think it would be nice to have something like "krunner --oneshot query". First change would be that if --oneshot (or a better name) is given, krunner does not fork to a daemon, but shows the UI right now and closes itself when dismissed. This would make it much easier to use krunner in non-kde environments, where you don't want to digg around in some systemsettings panel to find out where to change that Alt-F2 shortcut, but just bind mod+r e.g. with your window manager to start a krunner dialog.

Second proposal here is to extend the command line of krunner to accept an initial value for what to search as a command line parameter. So you could bind mod4+i to "krunner --oneshot 'install '" and mod4+t to "krunner --oneshot 'en:de '" Endless possibilities...

maxauthority said...

To my previous comment, actually i think that --oneshot like behavior should be default, and krunner --deamon should be needed explicitly (which is of course called automatically at kde startup)

Aaron J. Seigo said...

@maxauthority: "but just bind mod+r e.g. with your window manager to start a krunner dialog."

that's already supported. just run krunner again: if it is already running, it pops up the window for you. so when testing during devel i often use a shell alias i've set up `rk` (for run krunner) that does this:

kquitapp krunner; krunner && krunner

"extend the command line of krunner to accept an initial value"

good idea =)

Anonymous said...

It should definitely support OpenSearch. This seems to be the standard for web based search and querying - there are lots and lots of web services supporting this and it can also be used to plug in search providers in the top right textbox in Firefox. So support this and gets lots of providers for free from the start.

http://en.wikipedia.org/wiki/OpenSearch

maxauthority said...

@aaron: Oh good to know, thanks. Actually i wouldn't mind having a krunner daemon running, since a runner should be really fast to startup.

However in my about 1 month old version, when i start krunner on workspace 2 of my "wmii" window manager, then _all_ subsequent invocations of krunner open the dialog on workspace 2, even if i am on another workspace.

However, this might be fixed in the meantime, i should update kde4 again at the weekend, but maybe you quickly know what causes/caused this problem. (I think, it probably is, that the krunner window is just hidden and mapped, not destroyed/created, so this might not be fixable easily without a performance problem).

Back to the topic, i also opt for having tab completion for arguments, so
gi[tab] would result in "gimp " and then draw[tab] completes any pictures (or even all files, not just pictures to keep it generic). And this shouldn't be limited to the current working directory, but anywhere on the harddisc, favoring items in the $HOME directory however or maybe which usage statistics.

This would be helpful, if you don't want to open that "*draw*" file with the default program, but with any other.

Another intersting idea is that of ShellPrompt.hs which is part of the xmonad window manager:

http://article.gmane.org/gmane.comp.lang.haskell.xmonad/2089

(Short version: use bash-completion to get completions for commands)

Anonymous said...

"what time is it in toronto"
(where your current location might be london, etc!)

of course, shorter/alternate forms like "time in toronto" should also be acceptable

Anonymous said...

Two things:
-Amarok serach
-Google Calculator goodies, like: "time in toronto", "2007 in roman decimals", "160 pounds * 4000 feet in Calories " etc

Hans said...

Not exactly answering your question, but a suggestion: I want to be able to add my own runners - without being able to code.

How? My idea is to use dcop - or in the case of kde4, dbus - to create runners. (I don't know how the latter one works, but I guess it's similar to dcop).

For example, imagine a really scatterbrained person. We'll call him/her K for now. K makes notes all the time, and uses Basket to do so. Just to make a small note K has to bring up the Basket window which usually covers the other applications, click to write something and then minimize it again.

Now there should be a smart dcop command which takes a QString and adds it to the current opened basket. So K makes a new runner; note:QString, which is the same as running dcop whatever it is, in this case adding the note to K's basket! Now that's convenient - K just have to press alt+F2, write note: and a sentence a press return.

As for KDE4, as I said above, we would use dbus instead right? Well, I hope you've grasped the main idea, and if you think it's bad I would be pleased to hear why. :)

Aaron J. Seigo said...

@hans: you're essentially describing the commands runner i mention in the blog entry. =)

zypres said...

-Simmilar
-match
-map (marble)

Inspiration for you all (many more: http://yubnub.org/)

jeremys pics said...

News: google news
? : help
date: prints a date (today by default) in whatever format you need.
spell: spellcheck
speak: speaks a single english word, courtesy of Merriam-Webster.
skype: displays the status of a Skype user.
ascii: renders the phrase you provide with a very large collection of ASCII fonts.
lipsum: generates Lorem Ipsum text - meaningless latin-like filler.
gmt: retrieves the local time at a location.
convert: converts from one unit of measurement to another.
gearth: starts Google Earth (if you have it installed) and zooms you in to the address you provide.
whois: Find out who owns a particular domain name or IP address.

Aaron J. Seigo said...

@zypres: "http://yubnub.org/"

this is very similar to webshortcuts which we already have, we just need the natural language command runner to complete it =)

@jeremys: lots of great ideas there! =)

KenLove said...

To cheer on the earlier comments, I love the idea of tab-completion. I'd also like to add auto-suggest and a applications shortcuts catalog.

Not being a developer, my terminology may be off; so I'll attempt to explain. Application Shortcuts is my understanding are the [ALT]+n commands available in every application. I'd like it if krunner was aware of the application the currently has focus and able to execute actions within that application. An example, while using konqueror, ALT+F2 [TAB] "bookmark" would present the selections "Add Bookmark", "Bookmark Tabs", and "Edit Bookmarks". When a selection is chosen, that action is exacted. This could further be refined with auto-suggest, so the keyword "book" would present the suggestions "bookmark" and "list bookmarks" alleviating the need to commit every command syntax to memory.

If this is infeasible or amateurish, please feel free to beat me about the head. And thanks for posing this topic to the public, krunner is already poised to be a huge productivity enabler for the new KDE.

KenLove said...

A second suggestion that came about. I'd like to send a link or file to brother without having to remove my hands from the keyboard.

The krunner syntax would be something like "klipper contents send to George".

So, with tab-completion, auto-suggest, and natural language processing this krunner command could be as little as 9 keystrokes. "kli" [TAB] "co" [TAB] (brings up clipboard tool with focus in history list) [User selects clipboard item] "se" [TAB] "G" [TAB] (brings up contact list filtered to G) [User selects name such as "George by IM"] [Enter] command executes.

Phew, that was a lot to explain. Is it possible?

dmarti said...

30boxes.com has a good interface for adding calendar events in human language.

Another good one would be "todo" -- add a to-do item to the user's chosen task list, either a local app or a web site.

"dial" -- search the user's contacts and pop up a VoIP or DTMF dialer to call the person found. (Handy for people who remember usernames and nicks but not 10-digit strings)