Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Trasparency/opacity should not be a part of the theme. #4740

Closed
igor-petruk opened this issue Nov 14, 2022 · 8 comments
Closed

Trasparency/opacity should not be a part of the theme. #4740

igor-petruk opened this issue Nov 14, 2022 · 8 comments
Labels
C-enhancement Category: Improvements

Comments

@igor-petruk
Copy link

It should be a separate setting that could be applied to any theme, instead of creating transparent version like base16_transparent. Otherwise users have to customize every single theme if they want to try it on transparent terminal.

@igor-petruk igor-petruk added the C-enhancement Category: Improvements label Nov 14, 2022
@the-mikedavis
Copy link
Member

the-mikedavis commented Nov 14, 2022

Since #3067, you can inherit any theme and unset the ui.background scope:

# ~/.config/helix/themes/dracula_transparent.toml
inherits = "dracula"
"ui.background" = {}

I don't like the idea of adding an extra config option for this.

@mfarrugi
Copy link

This is the first thing I ran into with setting up helix because I have tmux changing the background for the active pane.

We could add the equivalent of base16_transparent.toml for every theme instead, but at that point why not support global overrides?

@igor-petruk
Copy link
Author

igor-petruk commented Dec 9, 2022

This suggestion does not work for some reason.

First the file is only detected if it is not ~/.config/helix/dracula_transparent.toml, but in themes subdirectory. I assume it is a typo. Also I use onedark, if it makes a difference.

Then the failure is "Invalid theme: 'ui.selection` required". Probably like #2247

OS - OpenBSD 7.2, helix is installed from a repo. These are the standard OS patches from the stock source - https://github.com/openbsd/ports/tree/master/editors/helix/patches

hx --version
helix 22.08.1
hx --health
Config file: /home/user/.config/helix/config.toml
Language file: default
Log file: /home/user/.cache/helix/helix.log
Runtime directory: /usr/local/share/helix/runtime
Clipboard provider: none
....

@the-mikedavis
Copy link
Member

Ah yeah, that's a typo, it should be under ~/.config/helix/themes. I'll edit the original post.

Theme inheritance is a new feature in 22.12 but you're running on 22.08.1. It looks like OpenBSD ports hasn't updated to 22.12 yet: https://repology.org/project/helix/versions

@igor-petruk
Copy link
Author

igor-petruk commented Dec 9, 2022 via email

@aral
Copy link
Contributor

aral commented Jan 15, 2023

Is there a way to get the transparency value from the terminal environment and apply it automatically to the background colour of whichever theme is active?

@the-mikedavis
Copy link
Member

AFAIK there isn't a cross-terminal way to figure out how the terminal opacity is configured. Even if we could find out, there's no way to tell the terminal how opaque to draw a background color: all colors are solid. The way that transparency works for themes like base16_transparent is that the theme unsets the ui.background scope so that we don't draw a background color at all.

@ghost
Copy link

ghost commented Feb 3, 2023

@the-mikedavis overriding a theme is good but it is hard to move between the themes while keeping the overrides. Helix's way of making changing themes so easy is great but cannot be used if the user override things.
I'd like to contribute this feature if it would be implemented. Something like an override.toml file that applies to whatever theme is active. If a user changes cursor colour or applies transparency, chances are they'd like that on every theme.

@helix-editor helix-editor locked and limited conversation to collaborators Apr 7, 2024
@pascalkuthe pascalkuthe converted this issue into discussion #10223 Apr 7, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

4 participants