Launchpad has imported 6 comments from the remote bug at
https://bugzilla.redhat.com/show_bug.cgi?id=689903.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2011-03-22T18:34:36+00:00 Dustin wrote:

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:
white,blue,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


ubuntu:
white,magenta,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

Please consider committing this patch against your upstream newt branch.
Thanks.

Signed-off-by:
Dustin Kirkland <[email protected]>

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/21

------------------------------------------------------------------------
On 2011-05-30T12:13:09+00:00 Miroslav wrote:

Instead of requiring all 44 colors on one line I think it would be
better to specify color of each item separately. For items which are not
specified in the config the default would be used.

Something like:

root=white,black
border=,yellow

Few more things:
- the default path should be configurable in the configure script, 
/etc/newt/colors by default?
- perhaps it would be useful to be able to override the colors also via 
getenv("NEWT_COLORS"), e.g. NEWT_COLORS=root=white,black:border=,yellow

I can look into it if you want.

Thanks.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/30

------------------------------------------------------------------------
On 2011-05-31T18:01:39+00:00 Dustin wrote:

Awesome!  Thanks for the response.  I was worried this bug/patch might
have gotten dumped into the bit bucket.

Regarding the format of the file, I just went for the simplest approach,
from the perspective of reading the values in the C code.  I didn't
expect this to be something that people changed often, frequently, or on
their own.  I expected more that a distro or a packager would do this,
and probably only ever do it once or twice, so I didn't really think
about it in terms of a user-friendly interface, but instead, just as a
"functional" one.

Regarding the default path, yes, of course, that could (and should?)
very well be configurable.  /etc/newt/colors seemed to me like a simple,
straightforward, obvious default.

Regarding a "NEWT_COLORS" environment variable, that's an excellent
idea, such that the color scheme could even be modified on an
application-by-application, or process-by-process basis (rather than
system wide).

I'm concerned a little bit by the complexity of the code necessary to
process the descriptive configuration file and/or environment variable.
At this point, I would prefer for you to point me to a git branch with
your implementation of these, and I'll gladly build/test that, and port
over Ubuntu's use of this functionality to your new implementation.

Cheers,
Dustin

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/31

------------------------------------------------------------------------
On 2011-06-02T11:43:02+00:00 Miroslav wrote:

Ok, I've pushed a patch implementing that to git
(git://git.fedorahosted.org/git/newt), please let me know how it works
for you.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/32

------------------------------------------------------------------------
On 2011-06-06T14:47:05+00:00 Dustin wrote:

Awesome, thanks!  I'll get this tested...

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/33

------------------------------------------------------------------------
On 2011-06-27T12:59:43+00:00 Miroslav wrote:

It is in newt-0.52.13.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/35


** Changed in: newt
       Status: Unknown => Fix Released

** Changed in: newt
   Importance: Unknown => Undecided

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/730672

Title:
  Improve Console Colors

To manage notifications about this bug go to:
https://bugs.launchpad.net/newt/+bug/730672/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to