Table of Contents

Name

bs - a simple button shell for X11

Synopsis

bs [ file ] [ Xt options ]

Description

bs is a simple button shell for X11. It is useful for repetitive tasks such as edit-compile-run cycles, and also as a general purpose menu.

bs builds, displays, and let you interact with a panel composed of labels and buttons. Labels contain informative text and buttons are associated with commands that are fed to a shell, in a pipe.

bs reads a panel description from the file given in the command line, or from the file .bsrc in the current directory if no file is given.

There are 4 kinds of lines in the file describing the panel: lines starting with a TAB; lines with a TAB elsewhere; lines without a TAB; and empty lines.

Lines without a TAB represent labels. The text in the line appears verbatim in the panel.

Lines with a TAB not on the first column represent buttons. The text before the TAB is the button text. The text after the TAB is a command fed to the shell when the button is pressed.

Lines starting with a TAB are fed to the shell as soon as bs begins. They typically contain variable definitions, but they can contain command. Because bs sends data to a shell using a single pipe that remains open throughout the execution, variables definitions remain after this initialization.

Panel layout is controled by empty lines. Buttons and labels appear side by side, from left to right. An empty line signals the start of a new row in the panel. So, descriptions of "horizontal" panels have no empty lines, and descriptions of "vertical" panels have an empty line after each element, including the last one.

SPACE characters are significant in labels and button labels. They can be used for alignment, provided a non-proportional font is used.

bs automatically adds a button labeled "quit" in the end of the panel; it does the obvious thing.

Example

Here is an example suitable for using TeX:


        F=paper
    paper
    edit    xterm -geometry 80x57+0+0 -title $F -e vi $F.tex &
    tex    latex $F.tex </dev/null
    dvi    xdvi -hushspecials -geometry +0+0 $F.dvi &
    ps    dvips -o $F.ps $F.dvi; ghostview $F.ps &
    print    dvips -f $F.dvi | lpr -h

A similar example would be adequate for compiling C programs.

Resources

bs does not define any new resources. It uses the following widgets from the Athena Widget set: Command, Form, Label. All standard X11 toolkit options are accepted on the command line.

Files

.bsrc

See Also

sh(1)

Bugs

Buttons should stay pressed until the corresponding command finishes. Of course, this only applies to commands that are run in the foreground.

/bin/sh is hard-coded into the program. Other shells did not quite work.

Author

Luiz Henrique de Figueiredo (lhf@visgraf.impa.br)

Please send me your comments, bug reports, corrections, etc.


Table of Contents