mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Added new color for 'D' state.
This commit is contained in:
parent
0e8a02367e
commit
64e0d9452d
7
CRT.c
7
CRT.c
@ -67,6 +67,7 @@ typedef enum ColorElements_ {
|
||||
PROCESS_MEGABYTES,
|
||||
PROCESS_TREE,
|
||||
PROCESS_R_STATE,
|
||||
PROCESS_D_STATE,
|
||||
PROCESS_BASENAME,
|
||||
PROCESS_HIGH_PRIORITY,
|
||||
PROCESS_LOW_PRIORITY,
|
||||
@ -280,6 +281,7 @@ void CRT_setColors(int colorScheme) {
|
||||
CRT_colors[PROCESS_BASENAME] = A_BOLD;
|
||||
CRT_colors[PROCESS_TREE] = A_BOLD;
|
||||
CRT_colors[PROCESS_R_STATE] = A_BOLD;
|
||||
CRT_colors[PROCESS_D_STATE] = A_BOLD;
|
||||
CRT_colors[PROCESS_HIGH_PRIORITY] = A_BOLD;
|
||||
CRT_colors[PROCESS_LOW_PRIORITY] = A_DIM;
|
||||
CRT_colors[PROCESS_THREAD] = A_BOLD;
|
||||
@ -343,6 +345,7 @@ void CRT_setColors(int colorScheme) {
|
||||
CRT_colors[PROCESS_BASENAME] = ColorPair(Blue,White);
|
||||
CRT_colors[PROCESS_TREE] = ColorPair(Green,White);
|
||||
CRT_colors[PROCESS_R_STATE] = ColorPair(Green,White);
|
||||
CRT_colors[PROCESS_D_STATE] = A_BOLD | ColorPair(Red,White);
|
||||
CRT_colors[PROCESS_HIGH_PRIORITY] = ColorPair(Red,White);
|
||||
CRT_colors[PROCESS_LOW_PRIORITY] = ColorPair(Red,White);
|
||||
CRT_colors[PROCESS_THREAD] = ColorPair(Blue,White);
|
||||
@ -406,6 +409,7 @@ void CRT_setColors(int colorScheme) {
|
||||
CRT_colors[PROCESS_BASENAME] = ColorPair(Green,Black);
|
||||
CRT_colors[PROCESS_TREE] = ColorPair(Blue,Black);
|
||||
CRT_colors[PROCESS_R_STATE] = ColorPair(Green,Black);
|
||||
CRT_colors[PROCESS_D_STATE] = A_BOLD | ColorPair(Red,Black);
|
||||
CRT_colors[PROCESS_HIGH_PRIORITY] = ColorPair(Red,Black);
|
||||
CRT_colors[PROCESS_LOW_PRIORITY] = ColorPair(Red,Black);
|
||||
CRT_colors[PROCESS_THREAD] = ColorPair(Blue,Black);
|
||||
@ -469,6 +473,7 @@ void CRT_setColors(int colorScheme) {
|
||||
CRT_colors[PROCESS_BASENAME] = A_BOLD | ColorPair(Cyan,Blue);
|
||||
CRT_colors[PROCESS_TREE] = ColorPair(Cyan,Blue);
|
||||
CRT_colors[PROCESS_R_STATE] = ColorPair(Green,Blue);
|
||||
CRT_colors[PROCESS_D_STATE] = A_BOLD | ColorPair(Red,Blue);
|
||||
CRT_colors[PROCESS_HIGH_PRIORITY] = ColorPair(Red,Blue);
|
||||
CRT_colors[PROCESS_LOW_PRIORITY] = ColorPair(Red,Blue);
|
||||
CRT_colors[PROCESS_THREAD] = ColorPair(Green,Blue);
|
||||
@ -534,6 +539,7 @@ void CRT_setColors(int colorScheme) {
|
||||
CRT_colors[PROCESS_THREAD] = ColorPair(Green,Black);
|
||||
CRT_colors[PROCESS_THREAD_BASENAME] = A_BOLD | ColorPair(Blue,Black);
|
||||
CRT_colors[PROCESS_R_STATE] = ColorPair(Green,Black);
|
||||
CRT_colors[PROCESS_D_STATE] = A_BOLD | ColorPair(Red,Black);
|
||||
CRT_colors[PROCESS_HIGH_PRIORITY] = ColorPair(Red,Black);
|
||||
CRT_colors[PROCESS_LOW_PRIORITY] = ColorPair(Red,Black);
|
||||
CRT_colors[BAR_BORDER] = A_BOLD | ColorPair(Green,Black);
|
||||
@ -596,6 +602,7 @@ void CRT_setColors(int colorScheme) {
|
||||
CRT_colors[PROCESS_BASENAME] = A_BOLD | ColorPair(Cyan,Black);
|
||||
CRT_colors[PROCESS_TREE] = ColorPair(Cyan,Black);
|
||||
CRT_colors[PROCESS_R_STATE] = ColorPair(Green,Black);
|
||||
CRT_colors[PROCESS_D_STATE] = A_BOLD | ColorPair(Red,Black);
|
||||
CRT_colors[PROCESS_HIGH_PRIORITY] = ColorPair(Red,Black);
|
||||
CRT_colors[PROCESS_LOW_PRIORITY] = ColorPair(Red,Black);
|
||||
CRT_colors[PROCESS_THREAD] = ColorPair(Green,Black);
|
||||
|
1
CRT.h
1
CRT.h
@ -58,6 +58,7 @@ typedef enum ColorElements_ {
|
||||
PROCESS_MEGABYTES,
|
||||
PROCESS_TREE,
|
||||
PROCESS_R_STATE,
|
||||
PROCESS_D_STATE,
|
||||
PROCESS_BASENAME,
|
||||
PROCESS_HIGH_PRIORITY,
|
||||
PROCESS_LOW_PRIORITY,
|
||||
|
13
Process.c
13
Process.c
@ -533,9 +533,16 @@ static void Process_writeField(Process* this, RichString* str, ProcessField fiel
|
||||
}
|
||||
case STATE: {
|
||||
snprintf(buffer, n, "%c ", this->state);
|
||||
attr = this->state == 'R'
|
||||
? CRT_colors[PROCESS_R_STATE]
|
||||
: attr;
|
||||
switch(this->state) {
|
||||
case 'R':
|
||||
attr = CRT_colors[PROCESS_R_STATE];
|
||||
break;
|
||||
case 'D':
|
||||
attr = CRT_colors[PROCESS_D_STATE];
|
||||
break;
|
||||
default:
|
||||
attr = this->state;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PRIORITY: {
|
||||
|
Loading…
Reference in New Issue
Block a user