-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore the original palette on exit #285
Comments
* palette_set: update pal256 damage map #230 * drone: use newest builders * palette: send oc on exit for color reset #285 * palette_new: copy existing palette in #230 * Python: use checkRGB everywhere * more palette unit testing * add ncplane_set_*_palindex() * render fg palindex #230 * palette index color is out of 1000 * jungle demo works #253
Unfortunately, it seems to be default colours of terminal, not colours from before the application started. |
Indeed. It would be desirable to get the colors from entry. I'll look into whether I can extract them on startup (in some cases, at least). Unfortunately, I seem to recall looking into this, and reading the palette on startup returns the console default palette. In that case, I don't see any way for me to retrieve the active palette, except perhaps for highly terminal/DE-specific mechanisms (which I'd really rather not get into if I can avoid them). If you see this as a major problem, or even a minor one I suppose, feel free to create a new issue explicitly calling for restoration of the palette as we found it. I'll investigate what can be done. Thanks, @QuLogic ! |
It's not a super high priority; I was just trying to figure out how to stop |
Hah, I had the same question eight years ago: Unless I've overlooked something over 9 months of Notcurses development (totally possible) and a decade of NCURSES development prior to that, there's no way to do this portably. Doing it properly involves horrors like extracting palette settings from gnome databases, and even then you're not guaranteed to be recovering the true palette of application start. Sorry! Do let me know if you find out otherwise...but I won't be holding my breath =[.
Well, I'm currently trying to get Notcurses established, so if you decide to go that route, feel free to mail me directly (or here) with any problems/comments. I'll be happy to help you along. |
Now that I've added palette color support (#230) and am working on a suitable demo (#253), we have a crap palette upon exit from
notcurses-demo
. We need to restore it on exit. Theoc
termcap string resets the palette to the original colors. I'm not sure whether that means "colors on startup of application" or "default colors of terminal". Ideally I'd think we'd try to do the first option.The text was updated successfully, but these errors were encountered: