Control color support with a simple flag - noice - small file browser (mirror /… | |
git clone git://git.codemadness.org/noice | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 3adbce1b597e0812f1e503e82a671a84ae105f89 | |
parent 3f05a6cc674f5bcca9ca0234906ac9804f5b8be3 | |
Author: Lazaros Koromilas <[email protected]> | |
Date: Sun, 3 Feb 2019 22:37:35 +0200 | |
Control color support with a simple flag | |
Diffstat: | |
M config.def.h | 1 + | |
M noice.c | 2 +- | |
2 files changed, 2 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/config.def.h b/config.def.h | |
@@ -8,6 +8,7 @@ int mtimeorder = 0; /* Set to 1 to sort by time modified */ | |
int icaseorder = 0; /* Set to 1 to sort by ignoring case */ | |
int idletimeout = 0; /* Screensaver timeout in seconds, 0 to disable */ | |
int showhidden = 0; /* Set to 1 to show hidden files by default */ | |
+int usecolor = 0; /* Set to 1 to enable color attributes */ | |
char *idlecmd = "rain"; /* The screensaver program */ | |
#define CURSR_ATTR A_REVERSE | |
diff --git a/noice.c b/noice.c | |
@@ -321,7 +321,7 @@ initcurses(void) | |
fprintf(stderr, "failed to initialize curses\n"); | |
exit(1); | |
} | |
- if (has_colors()) | |
+ if (usecolor && has_colors()) | |
initcolor(); | |
cbreak(); | |
noecho(); |