Skip to content
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

Add a build option for transparent background #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gpollo
Copy link

@gpollo gpollo commented Jun 29, 2017

This PR allows the user to build the application with background transparency using make transparent=1.

@clbr
Copy link
Owner

clbr commented Jun 29, 2017

Ncurses docs state that to use color -1, you must first call use_default_colors. I also think that this doesn't need to be an option at all, but replacing the BLACK color with -1 should work in most terminals.

@@ -91,11 +91,20 @@ void present(const unsigned int ticks, const char card[], unsigned int color) {
clear();

start_color();
#ifdef ENABLE_TRANSPARENT
use_default_colors();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use_default_colors is being called here. And yeah, I don't really if it's a good thing to default to -1 tho.

@gpollo
Copy link
Author

gpollo commented Jun 29, 2017

After some testing, always enabling transparency works fine under TTY, but I believe it is a matter of taste whether one wants transparency (it just looked great with my background under X desktop).

@clbr
Copy link
Owner

clbr commented Jun 29, 2017

None of my terminals use compositing, and under all of them -1 is just the default bg color (black for all but xterm, which is white). So please make it the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants