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

Buffer colors are not respected #65

Open
nkh opened this issue Sep 16, 2020 · 12 comments
Open

Buffer colors are not respected #65

nkh opened this issue Sep 16, 2020 · 12 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@nkh
Copy link

nkh commented Sep 16, 2020

tmux-thumb highlights the "hits" it finds in green regardless of the colors of the text.

when the buffer contains colored text, to show different types of data, recoloring everything green loses the original highlighting and makes finding what part to copy difficult.

using green when the string has no color is OK but colored text should be highlighted differently (underlining like terminals do seems like a good way)

@TutenStain
Copy link
Contributor

In addition to having an option to respect the colors, it should be possible to provide arbitrary colors and not just have a list of preselected ones. This plugin is great and all but does not really fit in to the theme I am using (in addition to the above mentioned issue).

@fcsonline
Copy link
Owner

fcsonline commented Dec 1, 2020

@nkh, You need somehow to differentiate the original console text from the tmux-thumbs mode. How do you do it if the colors are almost exactly de same with the only difference of the hints? Removing the original colors helps to reduce the overhead of understanding what is a hint and what isn't. Did you play with the color settings tmux-thumbs provide?

@TutenStain, About being able to set arbitrare colors, we are really limited by color support of terminals. Which one are you using?

@fcsonline fcsonline added bug Something isn't working enhancement New feature or request labels Dec 1, 2020
@TutenStain
Copy link
Contributor

I use iTerm and have defined a custom theme for tmux by modifying tmux.conf.

I do not think that only allowing a small set of predefined colors is the way to go, as that would limit the customizability (as for me this plugin sticks out a bit too much given the lack of colors to chose from).
What about allowing the standard 256 terminal colors as a start? That would be nice and would suite me well. Bonus if it would be possible to use tmux variables also for referencing colors.

@fcsonline
Copy link
Owner

@TutenStain feel free to open a pull request with the 256 colors addition, if you think it can improve your workflow

@fcsonline
Copy link
Owner

Should we close this issue?

@TutenStain
Copy link
Contributor

The original issue is to my knowledge not solved (since tmux-thumbs overrides the terminal colors upon its invocation). Would be interesting to investigate if that can be fixed. However, my comment about arbitrary color configuration support is fixed with a recent PR.

@nkh
Copy link
Author

nkh commented Mar 16, 2021

Simplest is to let the user decide what colors should be used to highlight, in my case anything with a different background and foreground color, that I'd like to chose, would work.

@nkh
Copy link
Author

nkh commented Mar 17, 2021

hi @fcsonline ,

I'm afraid I can't help since I have zero programming knowledge about Rust (it's on my list someday when I retire ;) ) but maybe we can ball a bit about it. Sometimes it's not having someone to talk to about a problem that stops one from finding a solution.

@aprowe
Copy link

aprowe commented Nov 4, 2021

Hm I really want to play around with this, perhaps swapping background + foreground for highlighted words, or trying some more intelligent color swapping to ensure high constrast. The change of colors (along with the line shifting bug I just posted) make it take sometimes a couple seconds to find the line I had in my sight.
Any hints on which functions / files I could play with to make this happen?

@fcsonline
Copy link
Owner

fcsonline commented Nov 4, 2021

In the /samples folder, there are many files to play with. They have many cases like long lines, long UTF chars, terminal colors and quite common weird cases. If you found a new interesting test case, feel free to add it.

@nkh
Copy link
Author

nkh commented Nov 5, 2021

I spend some time discussing this issue with my daughter, who's very artistic and studies UX, and we looked at many different cases, IE: when the output is in reverse color matching tmux selection color one can't see the start of the selection. There's no universal solution when lots of colors are displayed, maybe blinking and underlining exist for something but I'm not sure having a Christmas tree on the screen helps.

Some color manipulation, as ideas, can be found here
https://pinetools.com/complementary-color

on terminals with 256 or more colors, uninteresting text could be dimmed down or desaturated.

Of course letting the user choose is maybe not a bad idea, specially if the choices also contain the possibility to remove colors or not; and is probably the simplest. I'll check the patched version.

@fcsonline
Copy link
Owner

The main goal is to have high contrast to identify visually the hint as fast as possible. Then, we also have the command arguments to customized how they are shown. If you want to add an option to let users to keep colors or not, feel free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants