Accepted
Accepted copied to clipboard
Transparent background in editor
I have a transparent terminal. I like the way it looks.
In the acc editor, the line numbers have a transparent background, but the editor area does not.
Is there a way to configure a transparent background for both?
Thanks for your issue! :smile:
Is there a way to configure a transparent background for both?
No, now. But it can be implemented.
Could you share your environment(OS, terminal software)?
It looks good in macOS + iTerm2.
My OS is Manjaro Linux with the Xfce desktop.
Here are a two terminals:
Kitty https://sw.kovidgoyal.net/kitty/
Xfce Terminal
The Kitty terminal is capable of transparent background colors, since the status bar can do it. For example:
So, unfortunately, that status bar is a part of kitty terminal's internal UI. It's not really a terminal program. All other terminal programs I've run in linux have opaque background colors. :thinking:
https://github.com/kovidgoyal/kitty/blob/f9e8a4050ce5b502754934908d0e1691cc7ffc05/kitty/config_data.py#L843
So I think my only path forward is to not set a background color at all in acc
. I'll try it out.
I don't know if it is possible to do this with edits to the .tmTheme file only. :(
I confirmed that it is not applied transparency if the background color is different from the terminal's default color on Kitty with mac.
I think it can be resolved by adding a config that not to render background-color on editors' screen.
How do you think?
That might work. I could not figure out how to do that with edits to the xml file (and rebuilding). Maybe there is another command we can use from the syntax library.
Currently, acc uses Solarized (dark)
which is hardcoded in syntect
as the theme. and it's not configuable
note: assets/One Dark.tmTheme
is not used now.
https://github.com/hatoo/Accepted/blob/615885d6943a47bde703ad24ea1f9b24f63e86ca/src/syntax.rs#L55-L63
Maybe we should just make a syntax file configurable. Is it enough for you?
Runtime configuration would be good!
I've succeeded to draw transparent background on kitty on macOS by setting a theme whose background is #000000
.
Could you share your screenshot?
It works! This is a new computer, but for some reason it's working here. I am traveling, I will try it on my other devices when I get home in a few days.
Environment: Manjaro Linux, Xfce Desktop, Kitty v 1.16
On my other desktop I did have an older version of Kitty, because it is a Ubuntu-based machine and the package manager is not up to date. But the good news is this is my new main laptop! :)
I used the path-based configuration you provided as an option in #15 and copied the OneDark theme into a new file at $HOME/.config/acc/themes/Test.tmTheme, and provided the full path to that theme. And edited the background config to 00000.
Theme in a gist: https://gist.github.com/dontlaugh/62e7cc4b325638adc36d7155f4c9f0df#file-test-tmtheme-L17