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

Question: Is there a way to theme sngrep? #435

Open
Janik-Haag opened this issue May 16, 2023 · 3 comments
Open

Question: Is there a way to theme sngrep? #435

Janik-Haag opened this issue May 16, 2023 · 3 comments
Assignees
Labels

Comments

@Janik-Haag
Copy link

Janik-Haag commented May 16, 2023

I was wondering if there is a way to theme sngrep because the cyan is quite hard to read in my terminal. I couldn't find anything in the faq and the config section, that's why I opend this issue.

@Kaian Kaian self-assigned this May 18, 2023
@Kaian Kaian added the question label May 18, 2023
@Kaian
Copy link
Member

Kaian commented May 18, 2023

Hi @Janik-Haag

Sadly there is no configuration that can be done to change colors. They are initialized in the code, so you can change COLOR_CYAN for other ncurses color here if you're willing to use a compiled version.

// Initialize colorpairs
init_pair(CP_CYAN_ON_DEF, COLOR_CYAN, bg);
init_pair(CP_YELLOW_ON_DEF, COLOR_YELLOW, bg);
init_pair(CP_MAGENTA_ON_DEF, COLOR_MAGENTA, bg);
init_pair(CP_GREEN_ON_DEF, COLOR_GREEN, bg);
init_pair(CP_RED_ON_DEF, COLOR_RED, bg);
init_pair(CP_BLUE_ON_DEF, COLOR_BLUE, bg);
init_pair(CP_WHITE_ON_DEF, COLOR_WHITE, bg);
init_pair(CP_DEF_ON_CYAN, fg, COLOR_CYAN);
init_pair(CP_DEF_ON_BLUE, fg, COLOR_BLUE);
init_pair(CP_WHITE_ON_BLUE, COLOR_WHITE, COLOR_BLUE);
init_pair(CP_BLACK_ON_CYAN, COLOR_BLACK, COLOR_CYAN);
init_pair(CP_WHITE_ON_CYAN, COLOR_WHITE, COLOR_CYAN);
init_pair(CP_YELLOW_ON_CYAN, COLOR_YELLOW, COLOR_CYAN);
init_pair(CP_BLUE_ON_CYAN, COLOR_BLUE, COLOR_CYAN);
init_pair(CP_BLUE_ON_WHITE, COLOR_BLUE, COLOR_WHITE);
init_pair(CP_CYAN_ON_WHITE, COLOR_CYAN, COLOR_WHITE);
init_pair(CP_CYAN_ON_BLACK, COLOR_CYAN, COLOR_BLACK);

Regards!

@Janik-Haag
Copy link
Author

Would you accept a PR making this configurable? Then I might spend some time on this ^^

@Kaian
Copy link
Member

Kaian commented May 18, 2023

Sure, PRs are always welcome! Even more when makes things more configurable!

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

No branches or pull requests

2 participants