Application launcher with tab-completion

1

EDIT:

Ok, fair enough - probably using a standalone launcher is the way to go as Daniel Andersson suggest below. But this leads to following questions:

Either;

  1. How do I get bash-like command completion with Tab to work in xfrun4 or:
  2. Is there some other launcher (for xfce) that opens instantly enough (as fast as xterm) does not need crapload of KDE or Gnome libs that has tab-completion?

For instantly enough reference:

$ time $(xterm echo)

real    0m0.064s
user    0m0.048s
sys     0m0.004s

The original question was:

Old habits die hard, so on my Linux desktop I launch applications by opening a terminal and running the (X) application from the command line. I would like to turn one of my Xterm windows into an application launcher so that I can just type google-chrome or charm and the application is launched in the background without suffixing the command with & or Ctrl-Z followed by bg.

Is there an easy way to make an Xterm window / shell that runs all command in the background? Preferably a script that I can just source (in bash) or even better, something that is run automatically when I disembiggen the font by Ctrl-Shift--

Kimvais

Posted 2012-04-20T06:04:34.037

Reputation: 3 809

Answers

3

If your question really is "I want an application launcher", then there are plenty to choose from. It sounds like this is the easiest way to solve your actual problem. I use gmrun which is very light-weight and has completion. Wikipedia keeps a bigger list of such applications. Bind a keyboard shortcut to one of these, and then you can simply issue this shortcut instead of Ctrl+Shift+- and run the program.

If you question is "I don't want to have to type & to launch programs in the background in Bash", then you could do a script such as

#!/bin/sh
while true; do
    read command
    ${command} &
done

When run, you can enter a command, press Enter, and it will be launched in the background.

If you want the shell to automatically think "ah, this is a graphical program that he wants to run in the background" and only then add a &, then you'd need to keep some sort of list on all these binary names, and it would most likely be a great annoyance to other operations.

If your question is "How do I catch Ctrl+Shift+- in xterm and act on it?", then I don't know.

All in all: I strongly recommend to just use a stand-alone application launcher, and get used to the shortcut for that.

Daniel Andersson

Posted 2012-04-20T06:04:34.037

Reputation: 20 465

Ok. gmrun seems to be available in the default repositories and seems to be quick enough. – Kimvais – 2012-04-20T07:54:55.473