Skip to content

Commit 01226cf

Browse files
authored
Merge pull request #1671 from petrosvisconte/add-color-scheme
Added COLORSCHEME_NORD
2 parents 1c9d4ec + 3badff3 commit 01226cf

File tree

3 files changed

+117
-1
lines changed

3 files changed

+117
-1
lines changed

CRT.c

+115-1
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,121 @@ static int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
820820
[DYNAMIC_YELLOW] = ColorPair(Yellow, Black),
821821
[DYNAMIC_WHITE] = ColorPair(White, Black),
822822
},
823-
[COLORSCHEME_BROKENGRAY] = { 0 } // dynamically generated.
823+
[COLORSCHEME_BROKENGRAY] = { 0 }, // dynamically generated.
824+
[COLORSCHEME_NORD] = {
825+
[RESET_COLOR] = A_NORMAL,
826+
[DEFAULT_COLOR] = A_NORMAL,
827+
[FUNCTION_BAR] = ColorPair(Black, Cyan),
828+
[FUNCTION_KEY] = A_NORMAL,
829+
[PANEL_HEADER_FOCUS] = ColorPair(Black, Cyan),
830+
[PANEL_HEADER_UNFOCUS] = ColorPair(Black, Cyan),
831+
[PANEL_SELECTION_FOCUS] = ColorPair(Black, Cyan),
832+
[PANEL_SELECTION_FOLLOW] = A_REVERSE,
833+
[PANEL_SELECTION_UNFOCUS] = A_BOLD,
834+
[FAILED_SEARCH] = A_REVERSE | A_BOLD | ColorPair(Yellow, Black),
835+
[FAILED_READ] = A_BOLD | ColorPair(Yellow, Black),
836+
[PAUSED] = A_BOLD | ColorPair(Black, Cyan),
837+
[UPTIME] = A_BOLD,
838+
[BATTERY] = A_BOLD,
839+
[LARGE_NUMBER] = A_BOLD | ColorPair(Yellow, Black),
840+
[METER_SHADOW] = A_BOLD | ColorPairGrayBlack,
841+
[METER_TEXT] = A_NORMAL,
842+
[METER_VALUE] = A_BOLD,
843+
[METER_VALUE_ERROR] = A_BOLD,
844+
[METER_VALUE_IOREAD] = A_NORMAL,
845+
[METER_VALUE_IOWRITE] = A_NORMAL,
846+
[METER_VALUE_NOTICE] = A_BOLD | ColorPair(Cyan, Black),
847+
[METER_VALUE_OK] = A_NORMAL,
848+
[METER_VALUE_WARN] = A_BOLD,
849+
[LED_COLOR] = A_NORMAL,
850+
[TASKS_RUNNING] = A_BOLD,
851+
[PROCESS] = A_NORMAL,
852+
[PROCESS_SHADOW] = A_BOLD | ColorPairGrayBlack,
853+
[PROCESS_TAG] = A_BOLD | ColorPair(Cyan, Black),
854+
[PROCESS_MEGABYTES] = A_BOLD | ColorPair(White, Black),
855+
[PROCESS_GIGABYTES] = A_BOLD | ColorPair(Cyan, Black),
856+
[PROCESS_BASENAME] = A_BOLD,
857+
[PROCESS_TREE] = A_BOLD,
858+
[PROCESS_RUN_STATE] = A_BOLD,
859+
[PROCESS_D_STATE] = A_BOLD | ColorPair(Yellow, Black),
860+
[PROCESS_HIGH_PRIORITY] = A_BOLD,
861+
[PROCESS_LOW_PRIORITY] = A_BOLD | ColorPairGrayBlack,
862+
[PROCESS_NEW] = A_BOLD,
863+
[PROCESS_TOMB] = A_BOLD | ColorPairGrayBlack,
864+
[PROCESS_PRIV] = A_BOLD | ColorPair(Cyan, Black),
865+
[BAR_BORDER] = A_BOLD,
866+
[BAR_SHADOW] = A_BOLD | ColorPairGrayBlack,
867+
[SWAP] = A_BOLD,
868+
[SWAP_CACHE] = A_NORMAL,
869+
[SWAP_FRONTSWAP] = A_BOLD | ColorPairGrayBlack,
870+
[GRAPH_1] = A_BOLD,
871+
[GRAPH_2] = A_NORMAL,
872+
[MEMORY_USED] = A_BOLD | ColorPair(Yellow, Black),
873+
[MEMORY_BUFFERS] = A_NORMAL,
874+
[MEMORY_BUFFERS_TEXT] = A_NORMAL,
875+
[MEMORY_CACHE] = A_NORMAL,
876+
[MEMORY_SHARED] = A_NORMAL,
877+
[MEMORY_COMPRESSED] = A_BOLD | ColorPairGrayBlack,
878+
[HUGEPAGE_1] = A_BOLD,
879+
[HUGEPAGE_2] = A_NORMAL,
880+
[HUGEPAGE_3] = A_BOLD | ColorPair(Cyan, Black),
881+
[HUGEPAGE_4] = A_BOLD | ColorPair(Cyan, Black),
882+
[LOAD_AVERAGE_FIFTEEN] = A_BOLD | ColorPairGrayBlack,
883+
[LOAD_AVERAGE_FIVE] = A_NORMAL,
884+
[LOAD_AVERAGE_ONE] = A_BOLD,
885+
[LOAD] = A_BOLD,
886+
[HELP_BOLD] = A_BOLD,
887+
[HELP_SHADOW] = A_BOLD | ColorPairGrayBlack,
888+
[CLOCK] = A_BOLD,
889+
[DATE] = A_BOLD,
890+
[DATETIME] = A_BOLD,
891+
[CHECK_BOX] = A_BOLD,
892+
[CHECK_MARK] = A_NORMAL,
893+
[CHECK_TEXT] = A_NORMAL,
894+
[HOSTNAME] = A_BOLD | ColorPair(Cyan, Black),
895+
[CPU_NICE] = A_NORMAL,
896+
[CPU_NICE_TEXT] = A_NORMAL,
897+
[CPU_NORMAL] = A_BOLD,
898+
[CPU_SYSTEM] = A_BOLD | ColorPair(Yellow, Black),
899+
[CPU_IOWAIT] = A_NORMAL,
900+
[CPU_IRQ] = A_BOLD,
901+
[CPU_SOFTIRQ] = A_BOLD,
902+
[CPU_STEAL] = A_BOLD | ColorPairGrayBlack,
903+
[CPU_GUEST] = A_BOLD | ColorPairGrayBlack,
904+
[GPU_ENGINE_1] = A_BOLD,
905+
[GPU_ENGINE_2] = A_NORMAL,
906+
[GPU_ENGINE_3] = A_BOLD | ColorPair(Cyan, Black),
907+
[GPU_ENGINE_4] = A_BOLD | ColorPair(Cyan, Black),
908+
[GPU_RESIDUE] = A_BOLD,
909+
[PANEL_EDIT] = A_BOLD,
910+
[SCREENS_OTH_BORDER] = A_BOLD | ColorPairGrayBlack,
911+
[SCREENS_OTH_TEXT] = A_BOLD | ColorPairGrayBlack,
912+
[SCREENS_CUR_BORDER] = ColorPair(Black, Cyan),
913+
[SCREENS_CUR_TEXT] = ColorPair(Black, Cyan),
914+
[PRESSURE_STALL_THREEHUNDRED] = A_BOLD | ColorPairGrayBlack,
915+
[PRESSURE_STALL_SIXTY] = A_NORMAL,
916+
[PRESSURE_STALL_TEN] = A_BOLD,
917+
[FILE_DESCRIPTOR_USED] = A_BOLD,
918+
[FILE_DESCRIPTOR_MAX] = A_BOLD | ColorPair(Yellow, Black),
919+
[ZFS_MFU] = A_NORMAL,
920+
[ZFS_MRU] = A_NORMAL,
921+
[ZFS_ANON] = A_BOLD | ColorPairGrayBlack,
922+
[ZFS_HEADER] = A_BOLD,
923+
[ZFS_OTHER] = A_BOLD | ColorPairGrayBlack,
924+
[ZFS_COMPRESSED] = A_BOLD,
925+
[ZFS_RATIO] = A_BOLD,
926+
[ZRAM_COMPRESSED] = A_NORMAL,
927+
[ZRAM_UNCOMPRESSED] = A_NORMAL,
928+
[DYNAMIC_GRAY] = A_BOLD | ColorPairGrayBlack,
929+
[DYNAMIC_DARKGRAY] = A_BOLD | ColorPairGrayBlack,
930+
[DYNAMIC_RED] = A_BOLD | ColorPair(Yellow, Black),
931+
[DYNAMIC_GREEN] = A_BOLD,
932+
[DYNAMIC_BLUE] = A_BOLD | ColorPair(Cyan, Black),
933+
[DYNAMIC_CYAN] = A_BOLD | ColorPair(Cyan, Black),
934+
[DYNAMIC_MAGENTA] = A_BOLD,
935+
[DYNAMIC_YELLOW] = A_BOLD | ColorPair(Yellow, Black),
936+
[DYNAMIC_WHITE] = A_BOLD,
937+
},
824938
};
825939

826940
static bool CRT_retainScreenOnExit = false;

CRT.h

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ typedef enum ColorScheme_ {
3737
COLORSCHEME_MIDNIGHT,
3838
COLORSCHEME_BLACKNIGHT,
3939
COLORSCHEME_BROKENGRAY,
40+
COLORSCHEME_NORD,
4041
LAST_COLORSCHEME
4142
} ColorScheme;
4243

ColorsPanel.c

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ static const char* const ColorSchemeNames[] = {
3737
"MC",
3838
"Black Night",
3939
"Broken Gray",
40+
"Nord",
4041
NULL
4142
};
4243

0 commit comments

Comments
 (0)