darrenburns / posting

The modern API client that lives in your terminal.
Apache License 2.0
4.48k stars 64 forks source link

Inherit theme from terminal #55

Closed lucasqueiroz closed 1 month ago

lucasqueiroz commented 1 month ago

Hi! I really enjoy this! It was in my to-do list to do something like this, but well, this one is exactly what I was going to build. I'm just missing a way to set the theme based on the terminal, something similar to what happens when you use lazygit, for example - it uses the colors from your terminal, instead of defining the background and foreground colors. Right now I use Catppuccin Frappe, for example, and all the themes are very far from that - understandably.

Thanks!

darrenburns commented 1 month ago

Hey! Sorry - this isn't possible and is a deliberate design decision by Textual, the framework underlying Posting.

The reason is if we inherit from the terminal, we're only using ANSI colours and we have no idea how they will render in the end - that happens at the terminal emulator level after Posting renders.

It means we can't do things like automatically ensuring text is readable, opacity effects, colour blending, and more.

A theme system will arrive soon - possibly this week. You'll be able to add your own easily.