cmusatyalab / gammaray

Distributed Streaming Virtual Machine Introspection
Apache License 2.0
17 stars 6 forks source link

Add option to disable or change colored output. #26

Open bamos opened 9 years ago

bamos commented 9 years ago

This is very minor, but the blue font is very difficult to read with my current terminal and screen settings.

screen shot 2014-10-12 at 12 30 34 am

I've manually changed the colors in src/util/color.c, but I wonder if we can add an option like vim's set background=dark. I have the same problem with blue fonts in vim that this option fixes.

Some people may also not want colors, so while these modifications are being made, an option to disable colored output could also be added.

A quick fix could be to let the user set an environment variable GRAY_THEME to normal, dark, or disabled and then add a switch for this in the colored fprint statements.

theonewolf commented 9 years ago

Good ideas. I think I'd most like to see a CLI option in the future. To get to that point I wanted to one day rewrite all the main tools main functions to properly use getopt.

Currently, color can actually be disabled with a compile time option if I remember correctly.

I forget on exactly how to set it (I think it is normally set when running ./configure).

theonewolf commented 9 years ago

And maybe an even deeper fix would be to extend the color library to support loading color maps/basically theme files. Cool line of thinking.