bashrun2
launch applications from interactive bash sessions
bashrun2 is an application launcher based on a modified bash session in a small terminal window, providing all the well known bash features like tab-completion and history.
Additional features include automatic detection of console applications, rules for running console applications in dedicated terminals, running commands with a different user id, regexp based command line rewriting (file associations, web shortcuts, etc), user-defined actions and extensions, remote control features, and more.
Download
Latest stable is bashrun2-0.2.4.tar.gz.
All releases can be found under /download/bashrun2
Latest developments are available via github:
git clone https://github.com/hbekel/bashrun2
Installation
GNU autotools are used for building and installing bashrun2:
$ ./configure --prefix=/usr --sysconfdir=/etc
$ make
$ sudo make install
The default setup assumes that xterm is available. To use a different
default terminal, either edit the configuration files (see below) or
use the --with-terminal
and --with-exec-terminal
configure options
(see the README file for details).
Quick start guide
Using bashrun as a run dialog
Start bashrun2
from the command line or with a keybinding in your
window manager or desktop environment. Bashrun will start in its
default mode run-dialog
. It will create an interactive bash session
in a small one-line xterm(1) terminal and initialize the bashrun
engine.
Type a command to launch a graphical application and press
Enter
. Bashrun will launch the application and then hide the
terminal window. Now run bashrun2
again. The terminal window will be
shown again and you can enter another command. This time, type the
name of a console application. To launch it in a terminal, press
Alt-Enter
.
Bring up bashrun again and press F1
to view a complete list of
keybindings and available actions.
Using bashrun in a managed terminal
Start bashrun with bashrun2 --mode terminal
. It will launch a
bashrun session in terminal
mode, creating a standard sized terminal
window.
Pressing Enter
will run commands in the current shell as usual. You
can launch applications in the background now by pressing Alt-Enter
.
To launch a console application in a new terminal, press Alt-t
. All
other keybindings remain the same as in run-dialog
mode.
Bind a key in your window manager or desktop environment to run
bashrun2 --mode terminal
and use it to bring the window up front at
any time, regardless of whether it is behind other windows or on
another desktop. Run bashrun2 --help
or consult the manual for a
list of available options and commands.
Use terminal mode if you want to use a dedicated, bashrun augmented terminal that can be brought up front with a single keybinding in your window manager or desktop environment.
Using bashrun remotely
In an interactive bash session not started by bashrun, run the command
eval "$(bashrun2 --remote-control)"
A lightweight remote interface to an existing bashrun run-dialog session will be installed in the current bash session. Bashrun’s keybindings will be enabled in a similar way as in terminal mode, i.e. Alt-Enter can be used to launch commands in the background, and Alt-t can be used to launch commands in a terminal. Non-executable commands will also be passed on to the remote bashrun session, providing access to handler processing. Bookmarks and handler completion will be available as well.
Use this method if you want transparent remote access to bashrun’s features from any terminal.
Configuration
To configure bashrun, either edit the the system wide configuration
/etc/xdg/bashrun2/bashrun2.rc
or create the directory
~/.config/bashrun2/
and copy the configuration file into this
directory. The default configuration file contains commented examples
that should help to get you started. After editing the configuration
file, either restart bashrun or bring it up and press Alt-r
to make
changes take effect. See the manual page for all the details on
configuration.