Customize the command line colors

The expanded use of command line colors with q2cli in 2019.4 is great to see! Unfortunately, some of the colors (e.g., dark blues with the action list) are hard to see with a black terminal. Is there a means to customize the colors? I didn't see a mention when searching around -- I apologize if I overlooked documentation on this. A screenshot is attached showing how the dark blues currently look on my bash 4.1.2 terminal on Centos 6 (via iTerm.app) :slight_smile:

Best,
Daniel

2 Likes

Hi! I don’t know if you can replace it, but you definitely can try to use Jupyter lab. The background is white there, but you can customize it with themes. And it’s really convinient to use.

1 Like

Yes, thanks! Jupyter is great for many things, but I’m not quite ready to get rid of my terminal emulator nor to deviate from the high contrast black background which I’ve grown accustom too :slight_smile:

Best,
Daniel

2 Likes

I am in love with dark themes as well and sometimes it’s hard to read dark red or dark blue, but I am keeping to use dark theme in Jupyter as well.

There’s not really a way to customize it at the moment, I had a similar hesitation with the blue, but it’s the default directory color, so I was hoping that either it didn’t bother people who use it, or they would have already switched to a different scheme.

Adding customization shouldn’t be very difficult, as q2cli already has a cache directory. Do you have any suggestions on what the UX should be for changing it? A secret file, a dev or tool subcommand, a --config flag on root?

1 Like

Makes total sense!

What about something initially like:

$ qiime tools generate-q2cli-config  # construct a default config
Configuration created: /foo/bar/baz.cfg

…which places it in the cache or other directory for editing. This would not be the most ideal for many users but is a starting point. It could easily be possible to have:

$ qiime tools install-q2cli-theme --i-theme some_theme.q2cli
Theme installed!

So that users could share their customizations :fireworks:

The format could be something like:

darkblue:
    - methods
    - plugins
lightblue:
    - visualizations
red:
    - errors
yellow:
    - cautions
green:
    - allgood
purple:  # not used
white:
    bold:
        usage
        types
    italicized:
        properties

This could get crazy quickly :slight_smile: By not having it a “color” configuration, it opens up to using this for more than just colors too. One extension beyond colors may be implicit translations if a user specifies a language… (such as through translate-shell)?

4 Likes