-
Notifications
You must be signed in to change notification settings - Fork 581
-
Notifications
You must be signed in to change notification settings - Fork 581
htop "Display options -> shadow other users' processes" returns black on black for TERM=linux-16color on a Linux console (tty) #630
Comments
Please run this test program: /* color.c */
#include <curses.h>
int main(void) {
initscr();
start_color();
//init_color(8, 500, 500, 500); /* disabled line */
printw("Can change colors? %c\n", can_change_color() ? 'Y' : 'N');
for (int i = 0; i <= 15; i++) {
init_pair(i+2, i, 0);
attron(COLOR_PAIR(i+2));
printw("Color %d!\n", i);
attron(A_BOLD);
printw("Bold color %d %d!\n", i, COLOR_PAIRS);
attroff(A_BOLD);
}
refresh();
getch();
endwin();
} Compile it with and run it with and without Which colors, if any, appear as dark gray (and in which mode)? Sending images of your results would also be helpful. (If taking a screenshot from the console is problematic, you can take pictures from your phone :) ) If color 8 appears as cyan when running with I got some weird results in my machine (which would require some ugly workarounds in htop), and I'd like to see if the results are at least consistent across machines/distros. |
Got it, thanks! Interesting results! They look different than what I got in my system, but they look compatible to the tweak I implemented. Please try this branch, git clone --branch fixedgray https://github.com/hishamhm/htop
cd htop
./autogen.sh
./configure
make
./htop Hopefully it fixes the behavior of gray. It may even obsolete the "Broken Gray" mode! |
Yes, that works much better. Gray text (like the "other users' processes" but also in the header section on the gauges) is now readable very well under |
@fasterit Excellent, thank you! |
Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=793106
Reproducible by:
Can this be fixed in the curses magic htop uses or via a work-around or (least desirably) mentioned in the documentation?
The text was updated successfully, but these errors were encountered: