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

Why does bat not have ansi as default theme? #1928

Closed
chtenb opened this issue Oct 31, 2021 · 6 comments
Closed

Why does bat not have ansi as default theme? #1928

chtenb opened this issue Oct 31, 2021 · 6 comments
Labels
question Further information is requested

Comments

@chtenb
Copy link

chtenb commented Oct 31, 2021

It's not clear from the readme what the default theme is, but it doesn't look great on all terminals/terminal themes. The README does mention the great benefits of the ansi theme however:

  • Enjoy maximum compatibility. Some terminal utilities do not support more than 3-bit colors.
  • Adapt to terminal theme changes. Even for already printed output.
  • Visually harmonize better with other terminal software.

Maximum compatibility, works great with any setup by default. Why not have the ansi theme as default? That would save a lot of people research time into configuring bat. Most people are just looking for something easy that looks great immediately.

@chtenb chtenb added the question Further information is requested label Oct 31, 2021
@Enselic
Copy link
Collaborator

Enselic commented Oct 31, 2021

The problem with having ansi as the default theme is that it is much uglier than the default 24-bit theme. And like you say, most users just want something that looks great immediately. The ansi theme does not look great.

Also see #1104 (comment)

@chtenb
Copy link
Author

chtenb commented Oct 31, 2021

The ansi theme simply uses the base 16 color palette provided by the terminal emulator (i.e. the terminal theme), which is by no means restricted to 256 colors definition. It does look good on all my VSCode terminal themes. My point is: if a user has a certain terminal theme (probably selected carefully), why ignore that completely by default?

But thanks for the link. It seems this discussion has been done already.

@Enselic
Copy link
Collaborator

Enselic commented Nov 1, 2021

Most users don't have a carefully selected terminal theme. Compare our current default with ansi on a vanilla system and you'll see that our current default looks much better.

@Enselic Enselic closed this as completed Nov 13, 2021
@fregante
Copy link

fregante commented May 20, 2022

our current default looks much better.

I fail to see how displaying white text on white background is better. macOS has always had a white terminal by default so by default bat is broken there. It literally “does not work.” I don’t understand how you can continue to suggest that this is a good default.

Screen Shot 4

@Enselic
Copy link
Collaborator

Enselic commented May 21, 2022

I agree we have a problem. The mere fact that we repeatedly get complaints is a good indication of that. Personally, I think it would make sense to do the following:

  1. If on macOS, and
  2. if no explicit theme is set, and
  3. If not defaults read -globalDomain AppleInterfaceStyle is Dark (see Support for different themes based on Terminal color scheme #1746)

Then we should default to a theme that looks good on a light background.

It is not a perfect solution, but:

  1. It makes us look good on the vast majority of macOS systems
  2. The increased startup time can be avoided by explicitly setting a theme

@Enselic
Copy link
Collaborator

Enselic commented May 21, 2022

I created a PR to try the above approach. See #1746 (comment).

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

No branches or pull requests

3 participants