LINBIT / linstor-client

Python client for LINSTOR
https://docs.linbit.com/docs/linstor-guide/
GNU General Public License v3.0
22 stars 10 forks source link

Usability: bright yellow on white #45

Closed candlerb closed 3 years ago

candlerb commented 3 years ago

I run terminals with a white background. Status values which are bright yellow are very hard to read:

image

I realise I can turn off the coloring entirely with --no-color, but that has to be supplied on each command. So I was wondering either:

  1. Could --no-color be set via an enviroment variable?
  2. Could a slightly darker color be used? Color.BROWN (which is really "dark yellow" in ANSI terminal colors) looks acceptable to me in both modes:

image image

Tested using:

--- /usr/lib/python3/dist-packages/linstor_client/consts.py.orig    2021-01-13 09:56:42.000000000 +0000
+++ /usr/lib/python3/dist-packages/linstor_client/consts.py 2021-02-15 09:46:57.902526985 +0000
@@ -61,7 +61,7 @@
     (BLACK,
      DARKRE,
      DARKGREEN,
-     BROWN,
+     YELLOW,
      DARKBLUE,
      DARKPINK,
      TEAL,
@@ -69,7 +69,7 @@
      DARKGRAY,
      RED,
      GREEN,
-     YELLOW,
+     BRIGHTYELLOW,
      BLUE,
      PINK,
      TURQUOIS,
rp- commented 3 years ago

You can use a client config file with the no-color setting, e.g.:

[global]
no-color=

Otherwise, I would rather change your personal color theme and set a better readable yellow color, than changing yellow in the code, as for other users this would look totally different (depending on their used theme/colorscheme)

candlerb commented 3 years ago

Sure, I'm happy to do it that way - I wasn't aware it was possible.

There's no linstor manpage, but eventually I found in the linstor-api-py repo that the defaults file is ~/.config/linstor/linstor-client.conf or /etc/linstor/linstor-client.conf. That works with the setting you gave - thanks!

I also found that you can apply it via an environment variable. For --no-color it works as long as you give it an empty value.

root@node1:~# export LS_CLIENT_NO_COLOR=
root@node1:~# linstor v l
...