-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
White text color on white background terminal #1676
Comments
Could you please post the output of |
I already added a theme. It would be cool if it worked like cat and detect the terminal background color and ajust to it. Software versionbat 0.18.1 (3aea514) Operating systemLinux 5.10.41-1-lts Command-linebat --diagnostic Environment variablesSHELL=/bin/bash
PAGER=<not set>
LESS=<not set>
BAT_PAGER=<not set>
BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS=<not set>
BAT_STYLE=<not set>
BAT_TABS=<not set>
BAT_THEME=<not set>
XDG_CONFIG_HOME=/home/daniel/.config
XDG_CACHE_HOME=/home/daniel/.cache
COLORTERM=truecolor
NO_COLOR=<not set>
MANPAGER=<not set> Config file
Compile time information
Less version
|
You can try to do something like this: https://github.com/sharkdp/bat#dark-mode There is also an issue somewhere on this repository with a solution for bash, if I remember correctly. |
Thank you. |
@sharkdp I've been unable to use the dark mode instructions as part of a bat config file. Could you please share the right way to do it? Could be a syntax problem on my end, or a limitation of the config logic? I'd like to avoid using the alias method. Thanks. |
If you want it would be great if you could try the git master branch. In git master (and in the next release) bat will auto-detect macOS dark mode out of the box. The PR is this one: #2197 |
I put this into my .bashrc. export BAT_THEME="GitHub" |
I am admittedly on an old version of bat currently, but this stopped me usin it some time ago and not looked back until now. If I list the themes like so: Many of the light themes look very nice; but, it seems they're light themes but are outputting text in a light colour expecting a dark background, when I have my terminal set to light mode, as I do on all programs I use, so I can read it without the chances of eye cancer. I don't know if it's possible to detect the background colour of a terminal emulator portably, and reliably enough that it'll work, but I'm guessing that the colour scheme in this case is using a fixed colour for the text irrespective of the background. I'll just change themes for now, as some of them do render nicely, but if it would be possible to apply logic depending on the colour of the terminal's background, I guess that'd be an ideal solution. Or may be a pain in the arse, but perhaps a light-light theme and a light-dark theme - i.e. the themes can show text in light but one where the terminal is set up as dark, and one if the terminal is set up as light. Hopefully most colours wouldn't need to be changed - the syntax highlighting looks nice, but it's plain text that renders as white-on-white for me, when it ought to be black-on-white. Thanks 🦇 🐈 |
Describe the bug you encountered:
bat
prints white text color on white background terminal...
What did you expect to happen instead?
Expect to be like
cat
and, in these circunstances, print black text color...
How did you install
bat
?bat version and environment
ArchLinux
The text was updated successfully, but these errors were encountered: