Bashish theme HOWTO
The Bashish theme HOWTO describes the creation of a theme in a straight forward way.
Index
Prerequisits
Requirements
Fonts
Shell support
Terminal support
Application themeing
Customizing
Theme format
Prompt format
Variable reference
Terminal support
UTF-8 prompt, colors, font changing:
no UTF-8, colors, font changing:
- aterm
- Eterm
- XTerm
- rxvt
- mlterm
- SGI xwsh (no font changing)
Title only:
- PuTTY
- Terminal (XFCE)
- terminal.app (GNUStep)
- BeOS Terminal
- PowerShell
- screen
- multi-gnome-terminal
- x3270
- Sun cmdtool
- CDE dtterm
- MacOSX Terminal.app (help wanted!)
- iTerm (help wanted!)
Unsupported terminals:
The following terminals can not be themed by Bashish in any way:
- Most hardware terminals such as DEC vt102
- QNX phterm
- dxterm
Shell support
Bashish runs independently of the interactive shell in use, thus
obscure shells as 'lsh' and 'osh' can perfectly be used with
application themeing.
As creating prompts for all supported shells would be a daunting task,
prompts in general are only avaliable for bash, zsh and tcsh.
Following are the shells which can automaticly start Bashish upon startup:
- bourne shell compatible: ash bash dash ksh93 pdksh posh zsh
- c-shell compatible: csh tcsh
- Friendly Interactive SHell: fish
- dos compatible: lsh
- Old Enhanced Thompson shell: osh
- Plan/9 shell for UNIX: rc, es
To start Bashish on an unlisted shell, start 'bashish' and insert
$HOME/.bashish/launcher as the first element in your path.
Shells known not to be able to automaticly start Bashish:
- the bourne shell: sh
- sash shell: sash
- kiss shell: kiss
- esh: esh
- zoidberg: zoid
notes about osh:
osh does not support prompt changing.
notes about rc and es:
In order to load Bashish automaticly, rc needs to be started as a login
shell (eg. by using the '-l' switch).
notes about lsh:
Lsh needs to be restarted in order to make it aware of prompt changes.
In order to make theming in pipes work, one must explicity set the TTY
variable to the output of 'tty'.
Application theming
Application theming works by placing a launcher with the name of the themed command in the search path.
The launcher first themes the terminal, then runs the command with the
same options as given to itself. And finally, when the command has
ended its execution (or suspended), the launcher will restore the
terminal to the prompt theme.
To the user, this launcher should be totally transparent:
- It does not use the standard input/output/error, thereby the user
can expect normal functionality when using pipes and redirecting input
and output.
- It handles multiple files and filenames with spaces correctly.
- It returns the same exit code as the launched command.
- It works even if not connected to a tty (eg. when executed from a GUI)
- It can be suspended and restarted.
- It will never launch itself.
To temporary disable theming for one application, set the BASHISH_DISABLED
variable, eg:
$ BASHISH_DISABLED=1 joe
to disable theming for all applications in the current tty:
$ BASHISH_DISABLED=1;export BASHISH_DISABLED
in csh run:
% set BASHISH_DISABLED = 1; setenv BASHISH_DISABLED
to re-enable theming run:
$ unset BASHISH_DISABLED
The launcher itself will also disable theming for any of the application
child processes by setting the BASHISH_DISABLED variable.
Getting started
Bashish uses the autoconf build system, so if you previously have
compiled and installed a package on Linux this should be familar:
1. Download the bashish-2.x.y.tar.bz2 package
2. Decompress Bashish by running
bzip2 -cd bashish-2.x.y.tar.bz2 | tar xf -
3. Enter directory
4. Run
./configure && make
5. As root run
6. As user, launch bashish:
bashish
You will now be prompted about installing user configuration files.
7. Restart your shell by running
Replace 'bash' with your shell.
Now Bashish is installed and configured to launch upon starting a shell.
To configure the Bashish theme engine, run
bashishtheme
Fonts
Scalable fonts
Fonts are important for estetics and readability. Unfortually, there exists few good and free monospace fonts.
note, the following fonts are non-free and thus not hosted on SourceForge:
- InterruptRequested -
Used by the hearttracker theme, not quite readable, but estetics comes
before readability when it comes to playing various media :)
- Adore64 - Conversion of the C64 bitmap font, used by the C64 theme
- Amiga Forever - Conversion of the old Amiga Topaz font (with fixed aspect-ratio), used by the Amiga theme.
- Century Schoolbook Mono BT - yours trulys favourite programming and reading font, traditional serif font.
- Profont - good programming font if you like tiny text.
- Netterm ASCII - The netterm font is a bit taller than Bitstream Vera Sans Mono, slightly serifed and have rounder glyphs.
- Netterm OEM
- if you do not use UTF-8 encoding, you need to get a font with CP437
encoding to see ASCII-art prompts. This font is good hinted and can be
used with 8-bit ASCII art prompts.
To install any of the above, simply copy the font to $HOME/.fonts and run
fc-cache -fv $HOME/.fonts
you must restart all (gnome and kde) terminals for changes to take effect.
To see a comparision between different monospaced fonts, go to http://www.lowing.org/fonts/
Bitmap fonts
Rxvt-unicode can use both bitmap fonts and scalable fonts.
-
sgi-fonts (local copy) (MIT-licens
Requirements
Bashish requires the following to run:
- a ksh compatible shell - eg. bash, this is only for interpreting, you may still use your shell of choice with Bashish.
- a terminal, preferably an UTF-8 capable, use either
- "gnome-terminal" - provides many theming options, but can be heavy for older systems
- "rxvt-unicode" - uses few resources, very fast theme changing but slower than Gnome-terminal in scalable font performance.
- ed) fonts with good readability, includes a nice serifed bitmap font.
To install, create the ~/.fonts directory:
mkdir $HOME/.fonts
tar -xvzf sgi-fonts.tar.gz -C $HOME/.fonts
mkfontdir $HOME/.fonts
xset +fp $HOME/.fonts
The last line must be added to either .xinitrc or .xsession depending
on if you log in via a display manager or start X manually with eg.
startx.
Console fonts
In the Linux console, Bashish can change fonts.
The default font-pack is avaliable in /usr/share/consolefonts.
Additional fonts are avaliable from:
GNU CHCP Fonts Nice font pack with many different fonts.
Terminus fonts High quality readable fonts
C64 font - Commodore C64 font, retro!
Amiga font - Retro Amiga font.
Install the fonts in $HOME/.fonts