The program seems cool, but giving it a red color really makes it look like my computer is on fire. I think using grep or similar piping command can do the trick, but I see that it prints ASCII escape codes for colors and removes the special formatting of the output that makes it look like fire.


Using command line flags, you can configure the output to display in your terminal rather than a popup window.

aafire -driver stdout -width 80 # match width of your terminal
aafire --help # see available options

Now, the color is controlled using your shell application's preferences. For example, I am using gnome-terminal on Ubuntu, so I just go to the menu Edit>Profile Preferences.

As far as changing the font color and background color itself, this appears to be possible in principle:


Notice that the first line has a blue background. I imagine this is accomplished with escape characters specifying the background color. You can find lots of discussion about this with people asking about changing their bash prompt color.

In order to insert your escape characters to change the color, I am not sure it would be possible to do this from the shell. Perhaps you could write a custom bash script that accepts input from stdin, pipe the output of aafire into your script, echo the color-changing characters, and finally echo the message from stdin.

Alternatively, you might have to call the library, for instance from a C program.

#include <stdio.h>
#include <aalib.h>
aa_context *context;
void main(int argc, char **argv)
  if(!aa_parseoptions(NULL, NULL, &argc, argv) || argc!=1) {
    printf("Usage: %s [options]\n"
           "%s", argv[0], aa_help);
  context = aa_autoinit(&aa_defparams);
  if(context == NULL) {
    fprintf(stderr,"Cannot initialize AA-lib. Sorry\n");

Example source code from the aalib documentation.



ASCII fire (aafire) was created with the now dead libaa. That may actually predate terminal color codes (I don't remember). However, the newer varient is the still maintained libcaca which provides cacafire.



Try this

aafire -driver curses

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.