2006-03-04 18:16:49 +00:00
|
|
|
/*
|
|
|
|
htop - CRT.c
|
2011-05-26 16:35:07 +00:00
|
|
|
(C) 2004-2011 Hisham H. Muhammad
|
2006-03-04 18:16:49 +00:00
|
|
|
Released under the GNU GPL, see the COPYING file
|
|
|
|
in the source distribution for its full text.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "CRT.h"
|
|
|
|
|
2011-12-26 21:35:57 +00:00
|
|
|
#include "String.h"
|
2013-02-26 16:50:21 +00:00
|
|
|
#include "RichString.h"
|
2011-12-26 21:35:57 +00:00
|
|
|
|
2013-02-26 16:50:21 +00:00
|
|
|
#include <stdio.h>
|
2012-10-19 18:59:48 +00:00
|
|
|
#include <errno.h>
|
2006-03-04 18:16:49 +00:00
|
|
|
#include <signal.h>
|
|
|
|
#include <stdlib.h>
|
2012-10-19 18:59:48 +00:00
|
|
|
#include <string.h>
|
2015-01-22 01:27:31 +00:00
|
|
|
#include <locale.h>
|
2006-03-04 18:16:49 +00:00
|
|
|
|
|
|
|
#define ColorPair(i,j) COLOR_PAIR((7-i)*8+j)
|
|
|
|
|
2006-03-23 18:55:29 +00:00
|
|
|
#define COLORSCHEME_DEFAULT 0
|
|
|
|
#define COLORSCHEME_MONOCHROME 1
|
|
|
|
#define COLORSCHEME_BLACKONWHITE 2
|
|
|
|
#define COLORSCHEME_BLACKONWHITE2 3
|
|
|
|
#define COLORSCHEME_MIDNIGHT 4
|
|
|
|
#define COLORSCHEME_BLACKNIGHT 5
|
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
#define Black COLOR_BLACK
|
|
|
|
#define Red COLOR_RED
|
|
|
|
#define Green COLOR_GREEN
|
|
|
|
#define Yellow COLOR_YELLOW
|
|
|
|
#define Blue COLOR_BLUE
|
|
|
|
#define Magenta COLOR_MAGENTA
|
|
|
|
#define Cyan COLOR_CYAN
|
|
|
|
#define White COLOR_WHITE
|
|
|
|
|
|
|
|
//#link curses
|
|
|
|
|
|
|
|
/*{
|
2011-12-26 21:35:57 +00:00
|
|
|
#include <stdbool.h>
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2015-01-22 01:27:31 +00:00
|
|
|
typedef enum TreeStr_ {
|
|
|
|
TREE_STR_HORZ,
|
|
|
|
TREE_STR_VERT,
|
|
|
|
TREE_STR_RTEE,
|
|
|
|
TREE_STR_BEND,
|
|
|
|
TREE_STR_TEND,
|
|
|
|
TREE_STR_OPEN,
|
|
|
|
TREE_STR_SHUT,
|
|
|
|
TREE_STR_COUNT
|
|
|
|
} TreeStr;
|
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
typedef enum ColorElements_ {
|
|
|
|
RESET_COLOR,
|
|
|
|
DEFAULT_COLOR,
|
|
|
|
FUNCTION_BAR,
|
|
|
|
FUNCTION_KEY,
|
|
|
|
FAILED_SEARCH,
|
|
|
|
PANEL_HEADER_FOCUS,
|
|
|
|
PANEL_HEADER_UNFOCUS,
|
|
|
|
PANEL_HIGHLIGHT_FOCUS,
|
|
|
|
PANEL_HIGHLIGHT_UNFOCUS,
|
|
|
|
LARGE_NUMBER,
|
|
|
|
METER_TEXT,
|
|
|
|
METER_VALUE,
|
|
|
|
LED_COLOR,
|
|
|
|
UPTIME,
|
2008-09-23 06:21:28 +00:00
|
|
|
BATTERY,
|
2006-03-04 18:16:49 +00:00
|
|
|
TASKS_RUNNING,
|
|
|
|
SWAP,
|
|
|
|
PROCESS,
|
|
|
|
PROCESS_SHADOW,
|
|
|
|
PROCESS_TAG,
|
|
|
|
PROCESS_MEGABYTES,
|
|
|
|
PROCESS_TREE,
|
|
|
|
PROCESS_R_STATE,
|
2014-10-14 01:30:17 +00:00
|
|
|
PROCESS_D_STATE,
|
2006-03-04 18:16:49 +00:00
|
|
|
PROCESS_BASENAME,
|
|
|
|
PROCESS_HIGH_PRIORITY,
|
|
|
|
PROCESS_LOW_PRIORITY,
|
2008-03-08 23:39:48 +00:00
|
|
|
PROCESS_THREAD,
|
|
|
|
PROCESS_THREAD_BASENAME,
|
2006-03-04 18:16:49 +00:00
|
|
|
BAR_BORDER,
|
|
|
|
BAR_SHADOW,
|
|
|
|
GRAPH_1,
|
|
|
|
GRAPH_2,
|
|
|
|
MEMORY_USED,
|
|
|
|
MEMORY_BUFFERS,
|
2014-04-24 16:15:52 +00:00
|
|
|
MEMORY_BUFFERS_TEXT,
|
2006-03-04 18:16:49 +00:00
|
|
|
MEMORY_CACHE,
|
|
|
|
LOAD,
|
|
|
|
LOAD_AVERAGE_FIFTEEN,
|
|
|
|
LOAD_AVERAGE_FIVE,
|
|
|
|
LOAD_AVERAGE_ONE,
|
|
|
|
CHECK_BOX,
|
|
|
|
CHECK_MARK,
|
|
|
|
CHECK_TEXT,
|
|
|
|
CLOCK,
|
2010-08-24 23:20:38 +00:00
|
|
|
HELP_BOLD,
|
|
|
|
HOSTNAME,
|
2006-03-04 18:16:49 +00:00
|
|
|
CPU_NICE,
|
2014-04-24 16:15:52 +00:00
|
|
|
CPU_NICE_TEXT,
|
2006-03-04 18:16:49 +00:00
|
|
|
CPU_NORMAL,
|
|
|
|
CPU_KERNEL,
|
2006-10-04 14:21:27 +00:00
|
|
|
CPU_IOWAIT,
|
|
|
|
CPU_IRQ,
|
|
|
|
CPU_SOFTIRQ,
|
2010-08-24 23:20:38 +00:00
|
|
|
CPU_STEAL,
|
|
|
|
CPU_GUEST,
|
2006-03-04 18:16:49 +00:00
|
|
|
LAST_COLORELEMENT
|
|
|
|
} ColorElements;
|
|
|
|
|
2014-04-24 15:17:11 +00:00
|
|
|
void CRT_fatalError(const char* note) __attribute__ ((noreturn));
|
|
|
|
|
2014-11-24 20:55:03 +00:00
|
|
|
void CRT_handleSIGSEGV(int sgn);
|
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
}*/
|
|
|
|
|
2015-01-22 01:27:31 +00:00
|
|
|
const char *CRT_treeStrAscii[TREE_STR_COUNT] = {
|
|
|
|
"-", // TREE_STR_HORZ
|
|
|
|
"|", // TREE_STR_VERT
|
|
|
|
"`", // TREE_STR_RTEE
|
|
|
|
"`", // TREE_STR_BEND
|
|
|
|
",", // TREE_STR_TEND
|
|
|
|
"+", // TREE_STR_OPEN
|
|
|
|
"-", // TREE_STR_SHUT
|
|
|
|
};
|
|
|
|
|
|
|
|
const char *CRT_treeStrUtf8[TREE_STR_COUNT] = {
|
|
|
|
"\xe2\x94\x80", // TREE_STR_HORZ ─
|
|
|
|
"\xe2\x94\x82", // TREE_STR_VERT │
|
|
|
|
"\xe2\x94\x9c", // TREE_STR_RTEE ├
|
|
|
|
"\xe2\x94\x94", // TREE_STR_BEND └
|
|
|
|
"\xe2\x94\x8c", // TREE_STR_TEND ┌
|
|
|
|
"+", // TREE_STR_OPEN +
|
|
|
|
"\xe2\x94\x80", // TREE_STR_SHUT ─
|
|
|
|
};
|
|
|
|
|
|
|
|
const char **CRT_treeStr = CRT_treeStrAscii;
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2011-12-26 21:35:57 +00:00
|
|
|
static bool CRT_hasColors;
|
|
|
|
|
2012-12-05 15:12:20 +00:00
|
|
|
static int CRT_delay = 0;
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2012-12-05 15:12:20 +00:00
|
|
|
bool CRT_utf8 = false;
|
|
|
|
|
2006-06-06 20:41:01 +00:00
|
|
|
int CRT_colors[LAST_COLORELEMENT] = { 0 };
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2011-09-08 01:10:58 +00:00
|
|
|
int CRT_cursorX = 0;
|
|
|
|
|
2014-02-27 19:35:22 +00:00
|
|
|
int CRT_scrollHAmount = 5;
|
|
|
|
|
2006-07-23 22:45:24 +00:00
|
|
|
char* CRT_termType;
|
|
|
|
|
2015-01-22 01:27:31 +00:00
|
|
|
// TODO move color scheme to Settings, perhaps?
|
|
|
|
|
|
|
|
int CRT_colorScheme = 0;
|
|
|
|
|
2010-08-24 23:20:38 +00:00
|
|
|
void *backtraceArray[128];
|
|
|
|
|
2010-02-25 01:35:12 +00:00
|
|
|
static void CRT_handleSIGTERM(int sgn) {
|
|
|
|
(void) sgn;
|
2008-03-09 08:58:38 +00:00
|
|
|
CRT_done();
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
// TODO: pass an instance of Settings instead.
|
|
|
|
|
|
|
|
void CRT_init(int delay, int colorScheme) {
|
|
|
|
initscr();
|
|
|
|
noecho();
|
2014-04-28 20:55:52 +00:00
|
|
|
CRT_delay = delay/2;
|
|
|
|
if (CRT_delay == 0) {
|
|
|
|
CRT_delay = 1;
|
|
|
|
}
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colorScheme = colorScheme;
|
2014-04-28 20:55:52 +00:00
|
|
|
halfdelay(CRT_delay);
|
2006-03-04 18:16:49 +00:00
|
|
|
nonl();
|
|
|
|
intrflush(stdscr, false);
|
|
|
|
keypad(stdscr, true);
|
|
|
|
curs_set(0);
|
|
|
|
if (has_colors()) {
|
|
|
|
start_color();
|
|
|
|
CRT_hasColors = true;
|
|
|
|
} else {
|
|
|
|
CRT_hasColors = false;
|
|
|
|
}
|
2006-07-23 22:45:24 +00:00
|
|
|
CRT_termType = getenv("TERM");
|
2014-02-27 19:35:22 +00:00
|
|
|
if (String_eq(CRT_termType, "linux"))
|
|
|
|
CRT_scrollHAmount = 20;
|
|
|
|
else
|
|
|
|
CRT_scrollHAmount = 5;
|
2006-07-23 22:45:24 +00:00
|
|
|
if (String_eq(CRT_termType, "xterm") || String_eq(CRT_termType, "xterm-color") || String_eq(CRT_termType, "vt220")) {
|
2006-03-04 18:16:49 +00:00
|
|
|
define_key("\033[H", KEY_HOME);
|
|
|
|
define_key("\033[F", KEY_END);
|
2014-04-09 20:47:22 +00:00
|
|
|
define_key("\033[7~", KEY_HOME);
|
|
|
|
define_key("\033[8~", KEY_END);
|
2006-03-04 18:16:49 +00:00
|
|
|
define_key("\033OP", KEY_F(1));
|
|
|
|
define_key("\033OQ", KEY_F(2));
|
|
|
|
define_key("\033OR", KEY_F(3));
|
|
|
|
define_key("\033OS", KEY_F(4));
|
|
|
|
define_key("\033[11~", KEY_F(1));
|
|
|
|
define_key("\033[12~", KEY_F(2));
|
|
|
|
define_key("\033[13~", KEY_F(3));
|
|
|
|
define_key("\033[14~", KEY_F(4));
|
|
|
|
define_key("\033[17;2~", KEY_F(18));
|
|
|
|
}
|
|
|
|
#ifndef DEBUG
|
|
|
|
signal(11, CRT_handleSIGSEGV);
|
|
|
|
#endif
|
|
|
|
signal(SIGTERM, CRT_handleSIGTERM);
|
|
|
|
use_default_colors();
|
|
|
|
if (!has_colors())
|
|
|
|
CRT_colorScheme = 1;
|
|
|
|
CRT_setColors(CRT_colorScheme);
|
|
|
|
|
2015-01-22 01:27:31 +00:00
|
|
|
#ifdef HAVE_LIBNCURSESW
|
|
|
|
char *locale = setlocale(LC_ALL, NULL);
|
|
|
|
if (locale == NULL || locale[0] == '\0')
|
|
|
|
locale = setlocale(LC_CTYPE, NULL);
|
|
|
|
if (locale != NULL &&
|
|
|
|
(strstr(locale, "UTF-8") ||
|
|
|
|
strstr(locale, "utf-8") ||
|
|
|
|
strstr(locale, "UTF8") ||
|
|
|
|
strstr(locale, "utf8")))
|
|
|
|
CRT_utf8 = true;
|
|
|
|
else
|
|
|
|
CRT_utf8 = false;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
CRT_treeStr = CRT_utf8 ? CRT_treeStrUtf8 : CRT_treeStrAscii;
|
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
mousemask(BUTTON1_CLICKED, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CRT_done() {
|
|
|
|
curs_set(1);
|
|
|
|
endwin();
|
|
|
|
}
|
|
|
|
|
2012-10-19 18:59:48 +00:00
|
|
|
void CRT_fatalError(const char* note) {
|
|
|
|
char* sysMsg = strerror(errno);
|
|
|
|
CRT_done();
|
|
|
|
fprintf(stderr, "%s: %s\n", note, sysMsg);
|
|
|
|
exit(2);
|
|
|
|
}
|
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
int CRT_readKey() {
|
|
|
|
nocbreak();
|
|
|
|
cbreak();
|
2006-08-24 21:28:29 +00:00
|
|
|
nodelay(stdscr, FALSE);
|
2006-03-04 18:16:49 +00:00
|
|
|
int ret = getch();
|
2014-04-28 20:55:52 +00:00
|
|
|
halfdelay(CRT_delay);
|
2006-03-04 18:16:49 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CRT_disableDelay() {
|
|
|
|
nocbreak();
|
|
|
|
cbreak();
|
|
|
|
nodelay(stdscr, TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CRT_enableDelay() {
|
2014-04-28 20:55:52 +00:00
|
|
|
halfdelay(CRT_delay);
|
2006-03-04 18:16:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CRT_setColors(int colorScheme) {
|
|
|
|
CRT_colorScheme = colorScheme;
|
|
|
|
if (colorScheme == COLORSCHEME_BLACKNIGHT) {
|
|
|
|
for (int i = 0; i < 8; i++)
|
|
|
|
for (int j = 0; j < 8; j++)
|
|
|
|
init_pair((7-i)*8+j, i, j);
|
|
|
|
} else {
|
|
|
|
for (int i = 0; i < 8; i++)
|
|
|
|
for (int j = 0; j < 8; j++)
|
|
|
|
init_pair((7-i)*8+j, i, (j==0?-1:j));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (colorScheme == COLORSCHEME_MONOCHROME) {
|
|
|
|
CRT_colors[RESET_COLOR] = A_NORMAL;
|
|
|
|
CRT_colors[DEFAULT_COLOR] = A_NORMAL;
|
|
|
|
CRT_colors[FUNCTION_BAR] = A_REVERSE;
|
|
|
|
CRT_colors[FUNCTION_KEY] = A_NORMAL;
|
|
|
|
CRT_colors[PANEL_HEADER_FOCUS] = A_REVERSE;
|
|
|
|
CRT_colors[PANEL_HEADER_UNFOCUS] = A_REVERSE;
|
2008-03-08 23:39:48 +00:00
|
|
|
CRT_colors[PANEL_HIGHLIGHT_FOCUS] = A_REVERSE;
|
|
|
|
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = A_BOLD;
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[FAILED_SEARCH] = A_REVERSE | A_BOLD;
|
|
|
|
CRT_colors[UPTIME] = A_BOLD;
|
2008-09-23 06:21:28 +00:00
|
|
|
CRT_colors[BATTERY] = A_BOLD;
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[LARGE_NUMBER] = A_BOLD;
|
|
|
|
CRT_colors[METER_TEXT] = A_NORMAL;
|
|
|
|
CRT_colors[METER_VALUE] = A_BOLD;
|
|
|
|
CRT_colors[LED_COLOR] = A_NORMAL;
|
|
|
|
CRT_colors[TASKS_RUNNING] = A_BOLD;
|
|
|
|
CRT_colors[PROCESS] = A_NORMAL;
|
|
|
|
CRT_colors[PROCESS_SHADOW] = A_DIM;
|
|
|
|
CRT_colors[PROCESS_TAG] = A_BOLD;
|
|
|
|
CRT_colors[PROCESS_MEGABYTES] = A_BOLD;
|
|
|
|
CRT_colors[PROCESS_BASENAME] = A_BOLD;
|
|
|
|
CRT_colors[PROCESS_TREE] = A_BOLD;
|
|
|
|
CRT_colors[PROCESS_R_STATE] = A_BOLD;
|
2014-10-14 01:30:17 +00:00
|
|
|
CRT_colors[PROCESS_D_STATE] = A_BOLD;
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[PROCESS_HIGH_PRIORITY] = A_BOLD;
|
|
|
|
CRT_colors[PROCESS_LOW_PRIORITY] = A_DIM;
|
2008-03-08 23:39:48 +00:00
|
|
|
CRT_colors[PROCESS_THREAD] = A_BOLD;
|
|
|
|
CRT_colors[PROCESS_THREAD_BASENAME] = A_REVERSE;
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[BAR_BORDER] = A_BOLD;
|
|
|
|
CRT_colors[BAR_SHADOW] = A_DIM;
|
|
|
|
CRT_colors[SWAP] = A_BOLD;
|
|
|
|
CRT_colors[GRAPH_1] = A_BOLD;
|
2015-01-22 01:27:31 +00:00
|
|
|
CRT_colors[GRAPH_2] = A_NORMAL;
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_USED] = A_BOLD;
|
|
|
|
CRT_colors[MEMORY_BUFFERS] = A_NORMAL;
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[MEMORY_BUFFERS_TEXT] = A_NORMAL;
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_CACHE] = A_NORMAL;
|
|
|
|
CRT_colors[LOAD_AVERAGE_FIFTEEN] = A_DIM;
|
|
|
|
CRT_colors[LOAD_AVERAGE_FIVE] = A_NORMAL;
|
|
|
|
CRT_colors[LOAD_AVERAGE_ONE] = A_BOLD;
|
|
|
|
CRT_colors[LOAD] = A_BOLD;
|
|
|
|
CRT_colors[HELP_BOLD] = A_BOLD;
|
|
|
|
CRT_colors[CLOCK] = A_BOLD;
|
|
|
|
CRT_colors[CHECK_BOX] = A_BOLD;
|
|
|
|
CRT_colors[CHECK_MARK] = A_NORMAL;
|
|
|
|
CRT_colors[CHECK_TEXT] = A_NORMAL;
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[HOSTNAME] = A_BOLD;
|
|
|
|
CRT_colors[CPU_NICE] = A_NORMAL;
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[CPU_NICE_TEXT] = A_NORMAL;
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_NORMAL] = A_BOLD;
|
|
|
|
CRT_colors[CPU_KERNEL] = A_BOLD;
|
2007-11-09 00:40:59 +00:00
|
|
|
CRT_colors[CPU_IOWAIT] = A_NORMAL;
|
2006-10-04 14:21:27 +00:00
|
|
|
CRT_colors[CPU_IRQ] = A_BOLD;
|
|
|
|
CRT_colors[CPU_SOFTIRQ] = A_BOLD;
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_STEAL] = A_REVERSE;
|
|
|
|
CRT_colors[CPU_GUEST] = A_REVERSE;
|
2006-03-04 18:16:49 +00:00
|
|
|
} else if (CRT_colorScheme == COLORSCHEME_BLACKONWHITE) {
|
|
|
|
CRT_colors[RESET_COLOR] = ColorPair(Black,White);
|
|
|
|
CRT_colors[DEFAULT_COLOR] = ColorPair(Black,White);
|
|
|
|
CRT_colors[FUNCTION_BAR] = ColorPair(Black,Cyan);
|
|
|
|
CRT_colors[FUNCTION_KEY] = ColorPair(Black,White);
|
|
|
|
CRT_colors[PANEL_HEADER_FOCUS] = ColorPair(Black,Green);
|
|
|
|
CRT_colors[PANEL_HEADER_UNFOCUS] = ColorPair(Black,Green);
|
|
|
|
CRT_colors[PANEL_HIGHLIGHT_FOCUS] = ColorPair(Black,Cyan);
|
|
|
|
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = ColorPair(Blue,White);
|
|
|
|
CRT_colors[FAILED_SEARCH] = ColorPair(Red,Cyan);
|
|
|
|
CRT_colors[UPTIME] = ColorPair(Yellow,White);
|
2008-09-23 06:21:28 +00:00
|
|
|
CRT_colors[BATTERY] = ColorPair(Yellow,White);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[LARGE_NUMBER] = ColorPair(Red,White);
|
|
|
|
CRT_colors[METER_TEXT] = ColorPair(Blue,White);
|
|
|
|
CRT_colors[METER_VALUE] = ColorPair(Black,White);
|
|
|
|
CRT_colors[LED_COLOR] = ColorPair(Green,White);
|
|
|
|
CRT_colors[TASKS_RUNNING] = ColorPair(Green,White);
|
|
|
|
CRT_colors[PROCESS] = ColorPair(Black,White);
|
|
|
|
CRT_colors[PROCESS_SHADOW] = A_BOLD | ColorPair(Black,White);
|
|
|
|
CRT_colors[PROCESS_TAG] = ColorPair(White,Blue);
|
|
|
|
CRT_colors[PROCESS_MEGABYTES] = ColorPair(Blue,White);
|
2008-03-08 23:39:48 +00:00
|
|
|
CRT_colors[PROCESS_BASENAME] = ColorPair(Blue,White);
|
|
|
|
CRT_colors[PROCESS_TREE] = ColorPair(Green,White);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[PROCESS_R_STATE] = ColorPair(Green,White);
|
2014-10-14 01:30:17 +00:00
|
|
|
CRT_colors[PROCESS_D_STATE] = A_BOLD | ColorPair(Red,White);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[PROCESS_HIGH_PRIORITY] = ColorPair(Red,White);
|
|
|
|
CRT_colors[PROCESS_LOW_PRIORITY] = ColorPair(Red,White);
|
2008-03-08 23:39:48 +00:00
|
|
|
CRT_colors[PROCESS_THREAD] = ColorPair(Blue,White);
|
|
|
|
CRT_colors[PROCESS_THREAD_BASENAME] = A_BOLD | ColorPair(Blue,White);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[BAR_BORDER] = ColorPair(Blue,White);
|
|
|
|
CRT_colors[BAR_SHADOW] = ColorPair(Black,White);
|
|
|
|
CRT_colors[SWAP] = ColorPair(Red,White);
|
2015-01-22 01:27:31 +00:00
|
|
|
CRT_colors[GRAPH_1] = A_BOLD | ColorPair(Blue,White);
|
|
|
|
CRT_colors[GRAPH_2] = ColorPair(Blue,White);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_USED] = ColorPair(Green,White);
|
|
|
|
CRT_colors[MEMORY_BUFFERS] = ColorPair(Cyan,White);
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[MEMORY_BUFFERS_TEXT] = ColorPair(Cyan,White);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_CACHE] = ColorPair(Yellow,White);
|
|
|
|
CRT_colors[LOAD_AVERAGE_FIFTEEN] = ColorPair(Black,White);
|
|
|
|
CRT_colors[LOAD_AVERAGE_FIVE] = ColorPair(Black,White);
|
|
|
|
CRT_colors[LOAD_AVERAGE_ONE] = ColorPair(Black,White);
|
|
|
|
CRT_colors[LOAD] = ColorPair(Black,White);
|
|
|
|
CRT_colors[HELP_BOLD] = ColorPair(Blue,White);
|
2008-03-05 06:39:29 +00:00
|
|
|
CRT_colors[CLOCK] = ColorPair(Black,White);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[CHECK_BOX] = ColorPair(Blue,White);
|
|
|
|
CRT_colors[CHECK_MARK] = ColorPair(Black,White);
|
|
|
|
CRT_colors[CHECK_TEXT] = ColorPair(Black,White);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[HOSTNAME] = ColorPair(Black,White);
|
|
|
|
CRT_colors[CPU_NICE] = ColorPair(Cyan,White);
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[CPU_NICE_TEXT] = ColorPair(Cyan,White);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_NORMAL] = ColorPair(Green,White);
|
|
|
|
CRT_colors[CPU_KERNEL] = ColorPair(Red,White);
|
2010-11-20 18:06:49 +00:00
|
|
|
CRT_colors[CPU_IOWAIT] = A_BOLD | ColorPair(Black, White);
|
2006-10-04 14:21:27 +00:00
|
|
|
CRT_colors[CPU_IRQ] = ColorPair(Blue,White);
|
|
|
|
CRT_colors[CPU_SOFTIRQ] = ColorPair(Blue,White);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_STEAL] = ColorPair(Cyan,White);
|
|
|
|
CRT_colors[CPU_GUEST] = ColorPair(Cyan,White);
|
2006-03-04 18:16:49 +00:00
|
|
|
} else if (CRT_colorScheme == COLORSCHEME_BLACKONWHITE2) {
|
|
|
|
CRT_colors[RESET_COLOR] = ColorPair(Black,Black);
|
|
|
|
CRT_colors[DEFAULT_COLOR] = ColorPair(Black,Black);
|
|
|
|
CRT_colors[FUNCTION_BAR] = ColorPair(Black,Cyan);
|
|
|
|
CRT_colors[FUNCTION_KEY] = ColorPair(Black,Black);
|
|
|
|
CRT_colors[PANEL_HEADER_FOCUS] = ColorPair(Black,Green);
|
|
|
|
CRT_colors[PANEL_HEADER_UNFOCUS] = ColorPair(Black,Green);
|
|
|
|
CRT_colors[PANEL_HIGHLIGHT_FOCUS] = ColorPair(Black,Cyan);
|
|
|
|
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = ColorPair(Blue,Black);
|
|
|
|
CRT_colors[FAILED_SEARCH] = ColorPair(Red,Cyan);
|
|
|
|
CRT_colors[UPTIME] = ColorPair(Yellow,Black);
|
2008-09-23 06:21:28 +00:00
|
|
|
CRT_colors[BATTERY] = ColorPair(Yellow,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[LARGE_NUMBER] = ColorPair(Red,Black);
|
|
|
|
CRT_colors[METER_TEXT] = ColorPair(Blue,Black);
|
|
|
|
CRT_colors[METER_VALUE] = ColorPair(Black,Black);
|
|
|
|
CRT_colors[LED_COLOR] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[TASKS_RUNNING] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[PROCESS] = ColorPair(Black,Black);
|
|
|
|
CRT_colors[PROCESS_SHADOW] = A_BOLD | ColorPair(Black,Black);
|
|
|
|
CRT_colors[PROCESS_TAG] = ColorPair(White,Blue);
|
|
|
|
CRT_colors[PROCESS_MEGABYTES] = ColorPair(Blue,Black);
|
|
|
|
CRT_colors[PROCESS_BASENAME] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[PROCESS_TREE] = ColorPair(Blue,Black);
|
|
|
|
CRT_colors[PROCESS_R_STATE] = ColorPair(Green,Black);
|
2014-10-14 01:30:17 +00:00
|
|
|
CRT_colors[PROCESS_D_STATE] = A_BOLD | ColorPair(Red,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[PROCESS_HIGH_PRIORITY] = ColorPair(Red,Black);
|
|
|
|
CRT_colors[PROCESS_LOW_PRIORITY] = ColorPair(Red,Black);
|
2008-03-08 23:39:48 +00:00
|
|
|
CRT_colors[PROCESS_THREAD] = ColorPair(Blue,Black);
|
|
|
|
CRT_colors[PROCESS_THREAD_BASENAME] = A_BOLD | ColorPair(Blue,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[BAR_BORDER] = ColorPair(Blue,Black);
|
|
|
|
CRT_colors[BAR_SHADOW] = ColorPair(Black,Black);
|
|
|
|
CRT_colors[SWAP] = ColorPair(Red,Black);
|
2015-01-22 01:27:31 +00:00
|
|
|
CRT_colors[GRAPH_1] = A_BOLD | ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[GRAPH_2] = ColorPair(Cyan,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_USED] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[MEMORY_BUFFERS] = ColorPair(Cyan,Black);
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[MEMORY_BUFFERS_TEXT] = ColorPair(Cyan,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_CACHE] = ColorPair(Yellow,Black);
|
|
|
|
CRT_colors[LOAD_AVERAGE_FIFTEEN] = ColorPair(Black,Black);
|
|
|
|
CRT_colors[LOAD_AVERAGE_FIVE] = ColorPair(Black,Black);
|
|
|
|
CRT_colors[LOAD_AVERAGE_ONE] = ColorPair(Black,Black);
|
|
|
|
CRT_colors[LOAD] = ColorPair(White,Black);
|
|
|
|
CRT_colors[HELP_BOLD] = ColorPair(Blue,Black);
|
|
|
|
CRT_colors[CLOCK] = ColorPair(White,Black);
|
|
|
|
CRT_colors[CHECK_BOX] = ColorPair(Blue,Black);
|
|
|
|
CRT_colors[CHECK_MARK] = ColorPair(Black,Black);
|
|
|
|
CRT_colors[CHECK_TEXT] = ColorPair(Black,Black);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[HOSTNAME] = ColorPair(White,Black);
|
|
|
|
CRT_colors[CPU_NICE] = ColorPair(Cyan,Black);
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[CPU_NICE_TEXT] = ColorPair(Cyan,Black);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_NORMAL] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[CPU_KERNEL] = ColorPair(Red,Black);
|
2007-11-09 00:40:59 +00:00
|
|
|
CRT_colors[CPU_IOWAIT] = A_BOLD | ColorPair(Black, Black);
|
2006-10-04 14:21:27 +00:00
|
|
|
CRT_colors[CPU_IRQ] = A_BOLD | ColorPair(Blue,Black);
|
|
|
|
CRT_colors[CPU_SOFTIRQ] = ColorPair(Blue,Black);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_STEAL] = ColorPair(Black,Black);
|
|
|
|
CRT_colors[CPU_GUEST] = ColorPair(Black,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
} else if (CRT_colorScheme == COLORSCHEME_MIDNIGHT) {
|
|
|
|
CRT_colors[RESET_COLOR] = ColorPair(White,Blue);
|
|
|
|
CRT_colors[DEFAULT_COLOR] = ColorPair(White,Blue);
|
|
|
|
CRT_colors[FUNCTION_BAR] = ColorPair(Black,Cyan);
|
|
|
|
CRT_colors[FUNCTION_KEY] = A_NORMAL;
|
|
|
|
CRT_colors[PANEL_HEADER_FOCUS] = ColorPair(Black,Cyan);
|
|
|
|
CRT_colors[PANEL_HEADER_UNFOCUS] = ColorPair(Black,Cyan);
|
|
|
|
CRT_colors[PANEL_HIGHLIGHT_FOCUS] = ColorPair(Black,White);
|
|
|
|
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = A_BOLD | ColorPair(Yellow,Blue);
|
|
|
|
CRT_colors[FAILED_SEARCH] = ColorPair(Red,Cyan);
|
|
|
|
CRT_colors[UPTIME] = A_BOLD | ColorPair(Yellow,Blue);
|
2008-09-23 06:21:28 +00:00
|
|
|
CRT_colors[BATTERY] = A_BOLD | ColorPair(Yellow,Blue);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[LARGE_NUMBER] = A_BOLD | ColorPair(Red,Blue);
|
|
|
|
CRT_colors[METER_TEXT] = ColorPair(Cyan,Blue);
|
|
|
|
CRT_colors[METER_VALUE] = A_BOLD | ColorPair(Cyan,Blue);
|
|
|
|
CRT_colors[LED_COLOR] = ColorPair(Green,Blue);
|
|
|
|
CRT_colors[TASKS_RUNNING] = A_BOLD | ColorPair(Green,Blue);
|
|
|
|
CRT_colors[PROCESS] = ColorPair(White,Blue);
|
|
|
|
CRT_colors[PROCESS_SHADOW] = A_BOLD | ColorPair(Black,Blue);
|
|
|
|
CRT_colors[PROCESS_TAG] = A_BOLD | ColorPair(Yellow,Blue);
|
|
|
|
CRT_colors[PROCESS_MEGABYTES] = ColorPair(Cyan,Blue);
|
|
|
|
CRT_colors[PROCESS_BASENAME] = A_BOLD | ColorPair(Cyan,Blue);
|
|
|
|
CRT_colors[PROCESS_TREE] = ColorPair(Cyan,Blue);
|
|
|
|
CRT_colors[PROCESS_R_STATE] = ColorPair(Green,Blue);
|
2014-10-14 01:30:17 +00:00
|
|
|
CRT_colors[PROCESS_D_STATE] = A_BOLD | ColorPair(Red,Blue);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[PROCESS_HIGH_PRIORITY] = ColorPair(Red,Blue);
|
|
|
|
CRT_colors[PROCESS_LOW_PRIORITY] = ColorPair(Red,Blue);
|
2008-03-08 23:39:48 +00:00
|
|
|
CRT_colors[PROCESS_THREAD] = ColorPair(Green,Blue);
|
|
|
|
CRT_colors[PROCESS_THREAD_BASENAME] = A_BOLD | ColorPair(Green,Blue);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[BAR_BORDER] = A_BOLD | ColorPair(Yellow,Blue);
|
|
|
|
CRT_colors[BAR_SHADOW] = ColorPair(Cyan,Blue);
|
|
|
|
CRT_colors[SWAP] = ColorPair(Red,Blue);
|
2015-01-22 01:27:31 +00:00
|
|
|
CRT_colors[GRAPH_1] = A_BOLD | ColorPair(Cyan,Blue);
|
|
|
|
CRT_colors[GRAPH_2] = ColorPair(Cyan,Blue);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_USED] = A_BOLD | ColorPair(Green,Blue);
|
|
|
|
CRT_colors[MEMORY_BUFFERS] = A_BOLD | ColorPair(Cyan,Blue);
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[MEMORY_BUFFERS_TEXT] = A_BOLD | ColorPair(Cyan,Blue);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_CACHE] = A_BOLD | ColorPair(Yellow,Blue);
|
|
|
|
CRT_colors[LOAD_AVERAGE_FIFTEEN] = A_BOLD | ColorPair(Black,Blue);
|
|
|
|
CRT_colors[LOAD_AVERAGE_FIVE] = A_NORMAL | ColorPair(White,Blue);
|
|
|
|
CRT_colors[LOAD_AVERAGE_ONE] = A_BOLD | ColorPair(White,Blue);
|
|
|
|
CRT_colors[LOAD] = A_BOLD | ColorPair(White,Blue);
|
|
|
|
CRT_colors[HELP_BOLD] = A_BOLD | ColorPair(Cyan,Blue);
|
|
|
|
CRT_colors[CLOCK] = ColorPair(White,Blue);
|
|
|
|
CRT_colors[CHECK_BOX] = ColorPair(Cyan,Blue);
|
|
|
|
CRT_colors[CHECK_MARK] = A_BOLD | ColorPair(White,Blue);
|
|
|
|
CRT_colors[CHECK_TEXT] = A_NORMAL | ColorPair(White,Blue);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[HOSTNAME] = ColorPair(White,Blue);
|
|
|
|
CRT_colors[CPU_NICE] = A_BOLD | ColorPair(Cyan,Blue);
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[CPU_NICE_TEXT] = A_BOLD | ColorPair(Cyan,Blue);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_NORMAL] = A_BOLD | ColorPair(Green,Blue);
|
|
|
|
CRT_colors[CPU_KERNEL] = A_BOLD | ColorPair(Red,Blue);
|
|
|
|
CRT_colors[CPU_IOWAIT] = A_BOLD | ColorPair(Blue,Blue);
|
2006-10-04 14:21:27 +00:00
|
|
|
CRT_colors[CPU_IRQ] = A_BOLD | ColorPair(Black,Blue);
|
|
|
|
CRT_colors[CPU_SOFTIRQ] = ColorPair(Black,Blue);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_STEAL] = ColorPair(White,Blue);
|
|
|
|
CRT_colors[CPU_GUEST] = ColorPair(White,Blue);
|
2006-03-04 18:16:49 +00:00
|
|
|
} else if (CRT_colorScheme == COLORSCHEME_BLACKNIGHT) {
|
|
|
|
CRT_colors[RESET_COLOR] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[DEFAULT_COLOR] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[FUNCTION_BAR] = ColorPair(Black,Green);
|
|
|
|
CRT_colors[FUNCTION_KEY] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[PANEL_HEADER_FOCUS] = ColorPair(Black,Green);
|
|
|
|
CRT_colors[PANEL_HEADER_UNFOCUS] = ColorPair(Black,Green);
|
|
|
|
CRT_colors[PANEL_HIGHLIGHT_FOCUS] = ColorPair(Black,Cyan);
|
|
|
|
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = ColorPair(Black,White);
|
|
|
|
CRT_colors[FAILED_SEARCH] = ColorPair(Red,Cyan);
|
|
|
|
CRT_colors[UPTIME] = ColorPair(Green,Black);
|
2008-09-23 06:21:28 +00:00
|
|
|
CRT_colors[BATTERY] = ColorPair(Green,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[LARGE_NUMBER] = A_BOLD | ColorPair(Red,Black);
|
|
|
|
CRT_colors[METER_TEXT] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[METER_VALUE] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[LED_COLOR] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[TASKS_RUNNING] = A_BOLD | ColorPair(Green,Black);
|
|
|
|
CRT_colors[PROCESS] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[PROCESS_SHADOW] = A_BOLD | ColorPair(Black,Black);
|
|
|
|
CRT_colors[PROCESS_TAG] = A_BOLD | ColorPair(Yellow,Black);
|
|
|
|
CRT_colors[PROCESS_MEGABYTES] = A_BOLD | ColorPair(Green,Black);
|
|
|
|
CRT_colors[PROCESS_BASENAME] = A_BOLD | ColorPair(Green,Black);
|
|
|
|
CRT_colors[PROCESS_TREE] = ColorPair(Cyan,Black);
|
2008-03-08 23:39:48 +00:00
|
|
|
CRT_colors[PROCESS_THREAD] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[PROCESS_THREAD_BASENAME] = A_BOLD | ColorPair(Blue,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[PROCESS_R_STATE] = ColorPair(Green,Black);
|
2014-10-14 01:30:17 +00:00
|
|
|
CRT_colors[PROCESS_D_STATE] = A_BOLD | ColorPair(Red,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
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);
|
|
|
|
CRT_colors[BAR_SHADOW] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[SWAP] = ColorPair(Red,Black);
|
2015-01-22 01:27:31 +00:00
|
|
|
CRT_colors[GRAPH_1] = A_BOLD | ColorPair(Green,Black);
|
|
|
|
CRT_colors[GRAPH_2] = ColorPair(Green,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_USED] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[MEMORY_BUFFERS] = ColorPair(Blue,Black);
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[MEMORY_BUFFERS_TEXT] = A_BOLD | ColorPair(Blue,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_CACHE] = ColorPair(Yellow,Black);
|
|
|
|
CRT_colors[LOAD_AVERAGE_FIFTEEN] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[LOAD_AVERAGE_FIVE] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[LOAD_AVERAGE_ONE] = A_BOLD | ColorPair(Green,Black);
|
|
|
|
CRT_colors[LOAD] = A_BOLD;
|
|
|
|
CRT_colors[HELP_BOLD] = A_BOLD | ColorPair(Cyan,Black);
|
2008-03-08 23:39:48 +00:00
|
|
|
CRT_colors[CLOCK] = ColorPair(Green,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[CHECK_BOX] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[CHECK_MARK] = A_BOLD | ColorPair(Green,Black);
|
|
|
|
CRT_colors[CHECK_TEXT] = ColorPair(Cyan,Black);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[HOSTNAME] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[CPU_NICE] = ColorPair(Blue,Black);
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[CPU_NICE_TEXT] = A_BOLD | ColorPair(Blue,Black);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_NORMAL] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[CPU_KERNEL] = ColorPair(Red,Black);
|
2006-10-04 14:21:27 +00:00
|
|
|
CRT_colors[CPU_IOWAIT] = ColorPair(Yellow,Black);
|
|
|
|
CRT_colors[CPU_IRQ] = A_BOLD | ColorPair(Blue,Black);
|
|
|
|
CRT_colors[CPU_SOFTIRQ] = ColorPair(Blue,Black);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_STEAL] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[CPU_GUEST] = ColorPair(Cyan,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
} else {
|
|
|
|
/* Default */
|
|
|
|
CRT_colors[RESET_COLOR] = ColorPair(White,Black);
|
|
|
|
CRT_colors[DEFAULT_COLOR] = ColorPair(White,Black);
|
|
|
|
CRT_colors[FUNCTION_BAR] = ColorPair(Black,Cyan);
|
|
|
|
CRT_colors[FUNCTION_KEY] = ColorPair(White,Black);
|
|
|
|
CRT_colors[PANEL_HEADER_FOCUS] = ColorPair(Black,Green);
|
|
|
|
CRT_colors[PANEL_HEADER_UNFOCUS] = ColorPair(Black,Green);
|
|
|
|
CRT_colors[PANEL_HIGHLIGHT_FOCUS] = ColorPair(Black,Cyan);
|
|
|
|
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = ColorPair(Black,White);
|
|
|
|
CRT_colors[FAILED_SEARCH] = ColorPair(Red,Cyan);
|
|
|
|
CRT_colors[UPTIME] = A_BOLD | ColorPair(Cyan,Black);
|
2008-09-23 06:21:28 +00:00
|
|
|
CRT_colors[BATTERY] = A_BOLD | ColorPair(Cyan,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[LARGE_NUMBER] = A_BOLD | ColorPair(Red,Black);
|
|
|
|
CRT_colors[METER_TEXT] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[METER_VALUE] = A_BOLD | ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[LED_COLOR] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[TASKS_RUNNING] = A_BOLD | ColorPair(Green,Black);
|
|
|
|
CRT_colors[PROCESS] = A_NORMAL;
|
|
|
|
CRT_colors[PROCESS_SHADOW] = A_BOLD | ColorPair(Black,Black);
|
|
|
|
CRT_colors[PROCESS_TAG] = A_BOLD | ColorPair(Yellow,Black);
|
|
|
|
CRT_colors[PROCESS_MEGABYTES] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[PROCESS_BASENAME] = A_BOLD | ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[PROCESS_TREE] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[PROCESS_R_STATE] = ColorPair(Green,Black);
|
2014-10-14 01:30:17 +00:00
|
|
|
CRT_colors[PROCESS_D_STATE] = A_BOLD | ColorPair(Red,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[PROCESS_HIGH_PRIORITY] = ColorPair(Red,Black);
|
|
|
|
CRT_colors[PROCESS_LOW_PRIORITY] = ColorPair(Red,Black);
|
2008-03-08 23:39:48 +00:00
|
|
|
CRT_colors[PROCESS_THREAD] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[PROCESS_THREAD_BASENAME] = A_BOLD | ColorPair(Green,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[BAR_BORDER] = A_BOLD;
|
|
|
|
CRT_colors[BAR_SHADOW] = A_BOLD | ColorPair(Black,Black);
|
|
|
|
CRT_colors[SWAP] = ColorPair(Red,Black);
|
2015-01-22 01:27:31 +00:00
|
|
|
CRT_colors[GRAPH_1] = A_BOLD | ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[GRAPH_2] = ColorPair(Cyan,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_USED] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[MEMORY_BUFFERS] = ColorPair(Blue,Black);
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[MEMORY_BUFFERS_TEXT] = A_BOLD | ColorPair(Blue,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[MEMORY_CACHE] = ColorPair(Yellow,Black);
|
2015-01-22 01:27:31 +00:00
|
|
|
CRT_colors[LOAD_AVERAGE_FIFTEEN] = A_NORMAL;
|
|
|
|
CRT_colors[LOAD_AVERAGE_FIVE] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[LOAD_AVERAGE_ONE] = A_BOLD | ColorPair(Cyan,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
CRT_colors[LOAD] = A_BOLD;
|
|
|
|
CRT_colors[HELP_BOLD] = A_BOLD | ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[CLOCK] = A_BOLD;
|
|
|
|
CRT_colors[CHECK_BOX] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[CHECK_MARK] = A_BOLD;
|
|
|
|
CRT_colors[CHECK_TEXT] = A_NORMAL;
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[HOSTNAME] = A_BOLD;
|
|
|
|
CRT_colors[CPU_NICE] = ColorPair(Blue,Black);
|
2014-04-24 16:15:52 +00:00
|
|
|
CRT_colors[CPU_NICE_TEXT] = A_BOLD | ColorPair(Blue,Black);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_NORMAL] = ColorPair(Green,Black);
|
|
|
|
CRT_colors[CPU_KERNEL] = ColorPair(Red,Black);
|
2007-11-09 00:40:59 +00:00
|
|
|
CRT_colors[CPU_IOWAIT] = A_BOLD | ColorPair(Black, Black);
|
2006-10-04 14:21:27 +00:00
|
|
|
CRT_colors[CPU_IRQ] = ColorPair(Yellow,Black);
|
|
|
|
CRT_colors[CPU_SOFTIRQ] = ColorPair(Magenta,Black);
|
2010-08-24 23:20:38 +00:00
|
|
|
CRT_colors[CPU_STEAL] = ColorPair(Cyan,Black);
|
|
|
|
CRT_colors[CPU_GUEST] = ColorPair(Cyan,Black);
|
2006-03-04 18:16:49 +00:00
|
|
|
}
|
|
|
|
}
|