Created attachment 486874
Make newt's system-wide palette configurable at run time
Hello,
We are carrying a small patch in Ubuntu that makes Newt's default color palette configurable, by optionally placing a configuration file at /etc/newt/palette.
If no file exists at that path, then newt's operation proceeds as normal.
If, on the other hand, a file does exist at that admin-owned location, a list of color values is read from that file and overloaded into the newtColors struct and set with newtSetColors().
I've tested it pretty well and seems to work quite nicely here.
For testing purposes, you can use these two sets of contents for your /etc/newt/palette values. The contents of the file is expected to contain newt's color keywords, all on a single line, comma-separate, no whitespace, and a total of 44 values. For example:
Created attachment 486874
Make newt's system-wide palette configurable at run time
Hello,
We are carrying a small patch in Ubuntu that makes Newt's default color palette configurable, by optionally placing a configuration file at /etc/newt/palette.
If no file exists at that path, then newt's operation proceeds as normal.
If, on the other hand, a file does exist at that admin-owned location, a list of color values is read from that file and overloaded into the newtColors struct and set with newtSetColors().
I've tested it pretty well and seems to work quite nicely here.
For testing purposes, you can use these two sets of contents for your /etc/newt/palette values. The contents of the file is expected to contain newt's color keywords, all on a single line, comma-separate, no whitespace, and a total of 44 values. For example:
original: black,lightgray ,black, lightgray, white,black, red,lightgray, lightgray, red,red, lightgray, lightgray, blue,lightgray, red,lightgray, blue,blue, lightgray, black,lightgray ,lightgray, blue,black, lightgray, lightgray, red,white, blue,lightgray, blue,blue, red,blue, lightgray, black,lightgray ,lightgray, red,black, brown
white,blue,
ubuntu: black,lightgray ,black, lightgray, white,black, red,lightgray, lightgray, red,red, lightgray, lightgray, magenta, lightgray, red,lightgray, magenta, magenta, lightgray, black,lightgray ,lightgray, magenta, black,lightgray ,lightgray, red,white, magenta, lightgray, magenta, magenta, red,magenta, lightgray, black,lightgray ,lightgray, red,black, brown
white,magenta,
Please consider committing this patch against your upstream newt branch. Thanks.
Signed-off-by:
Dustin Kirkland <email address hidden>