NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: wsconst changing forground/background colors
On Fri, 29 Oct 2021, Riza Dindir wrote:
How is it possible to use the "light" colors defined in the
"src/sys/dev/wscons/wsdisplayvar.h" file with the wsconsctl? Although
in the "console drivers" sections in the guide, it says we can only
use the first 8 colors, it seems.
You'll have to patch wsconsctl to use those "light" colours. However,
apart from WSCOL_LIGHT_GREY, the light colours are actually the _bold_
variants of the corresponding colours, and so aggravate your case.
---START PATCH---
diff -urN a/wsconsctl/util.c b/wsconsctl/util.c
--- a/wsconsctl/util.c 2018-11-23 06:31:57.000000000 +0000
+++ b/wsconsctl/util.c 2021-10-29 21:11:55.338724885 +0000
@@ -154,6 +154,14 @@
{ WSCOL_MAGENTA, "magenta" },
{ WSCOL_CYAN, "cyan" },
{ WSCOL_WHITE, "white" },
+ { WSCOL_LIGHT_GREY, "grey" },
+ { WSCOL_LIGHT_RED, "bold_red" },
+ { WSCOL_LIGHT_GREEN, "bold_green" },
+ { WSCOL_LIGHT_BROWN, "bold_brown" },
+ { WSCOL_LIGHT_BLUE, "bold_blue" },
+ { WSCOL_LIGHT_MAGENTA, "bold_magenta" },
+ { WSCOL_LIGHT_CYAN, "bold_cyan" },
+ { WSCOL_LIGHT_WHITE, "bold_white" },
};
static struct nameint attr_tab[] = {
diff -urN a/wsconsctl/wsconsctl.h b/wsconsctl/wsconsctl.h
--- a/wsconsctl/wsconsctl.h 2018-11-23 06:31:57.000000000 +0000
+++ b/wsconsctl/wsconsctl.h 2021-10-29 20:53:55.135438517 +0000
@@ -41,6 +41,14 @@
#define WSCOL_MAGENTA 5
#define WSCOL_CYAN 6
#define WSCOL_WHITE 7
+#define WSCOL_LIGHT_GREY (WSCOL_BLACK+8)
+#define WSCOL_LIGHT_RED (WSCOL_RED+8)
+#define WSCOL_LIGHT_GREEN (WSCOL_GREEN+8)
+#define WSCOL_LIGHT_BROWN (WSCOL_BROWN+8)
+#define WSCOL_LIGHT_BLUE (WSCOL_BLUE+8)
+#define WSCOL_LIGHT_MAGENTA (WSCOL_MAGENTA+8)
+#define WSCOL_LIGHT_CYAN (WSCOL_CYAN+8)
+#define WSCOL_LIGHT_WHITE (WSCOL_WHITE+8)
/* flag values: */
#define WSATTR_NONE 0
#define WSATTR_REVERSE 1
---END PATCH---
-RVP
Home |
Main Index |
Thread Index |
Old Index