NAME

command-runner.sample - example script for use with tabbedex tab-arguments

SYNOPSIS

command-runner.sample id command [ arguments ... ]

DESCRIPTION

Runs a predefined commands identified by id or command if id doesn't match any. Predefined commands are hard-coded in the source code of this script.

OPTIONS

id

Identifier of a predefined command to run. Typically a zero-indexed integer.

command [ arguments ... ]

Command to execute if id does not match any know predefined command.

TABBEDEX

The script is designed to work with tabbedex urxvt plugin (and showcase its tab-arguments configuration resource). It can be used to execute different commands in different tabs. To use it, copy it and edit list of commands at the end of the file. Provided urxvt-tabbedex is installed in /usr/lib/urxvt, the following steps are a good start:

    mkdir -p ~/.urxvt
    cp /usr/lib/urxvt/tabbedex-command-runner.sample \
       ~/.urxvt/command-runner.sh
    ${VISUAL:-${EDITOR:-/bin/vi}} ~/.urxvt/command-runner.sh

Finally, configure tab-arguments resource, for example:

    URxvt.tabbedex.tab-arguments: \
        -e /bin/sh %~/.urxvt/command-runner.sh %n %E

With this done, each time new tab is started, this script will be run so that it can decide what actual command is executed in the tab.

To use this script in conjunction with pgid-cd.pl tool also packaged with urxvt-tabbedex, the resource should be:

    URxvt.tabbedex.tab-arguments: \
        -e /usr/lib/urxvt/tabbadex-pgid-cd %p \
        /bin/sh %~/.urxvt/command-runner.sh %n %e

(modulo the actual location of the files).

SEE ALSO

urxvt-tabbed(1) and tabbedex-pgid-cd(1)