Skip to content

Setting theme with +kitten themes produces empty current-theme.conf #6191

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

Closed
smeikx opened this issue Apr 16, 2023 · 6 comments
Closed

Setting theme with +kitten themes produces empty current-theme.conf #6191

smeikx opened this issue Apr 16, 2023 · 6 comments
Labels

Comments

@smeikx
Copy link

smeikx commented Apr 16, 2023

Setting color theme/scheme using kitty +kitten themes does not work since 0.28.0, it only produces an empty current-theme.conf.

To Reproduce

  1. kitty +kitten themes
  2. select theme
  3. press m
  4. an empty ~/.config/kitty/current-theme.conf has been created
  5. ~/.config/kitty/kitty.conf now contains this:
# BEGIN_KITTY_THEME
# Ayu Light
include current-theme.conf
# END_KITTY_THEME

The same happened with a different theme and when directly specifying a theme: kitty +kitten themes duckbones

Environment details
I tried it on Linux (Gentoo, sway) and macOS, each with my custom config and a completely empty ~/.config/kitty/kitty.conf.

@smeikx smeikx added the bug label Apr 16, 2023
@kovidgoyal
Copy link
Owner

Works for me with

mv ~/.config/kitty /tmp && kitty +kitten themes duckbones && cat ~/.config/kitty/current-theme.conf&& rm -rf ~/.config/kitty && mv /tmp/kitty ~/.config

The duckbones theme is displayed, as expected.

@smeikx
Copy link
Author

smeikx commented Apr 16, 2023

I overlooked a major detail, sorry for being sloppy:

I forgot I have ~/.config/kitty/themes/, containing Ayu Light.conf and duckbones.conf! Out of habit I subconsciously only tested with themes I am familiar with. 🤦

It seems only overwritten and custom themes are affected. When running kitty +kitten themes Grape everything works as expected.

But by

  1. storing the output of kitty +kitten themes --dump-theme Grape in ~/.config/kitty/themes/Grape.conf (curiously, using > did not work)
  2. and running kitty +kitten themes Grape

the same thing happens as described in the issue. After removing Grape.conf it worked again.
I also copied Grape.conf to ~/.config/kitty/themes/testy.conf and tried setting this entirely new theme, but with no success.


PS: I noticed that the name in the comment header in a theme file (## name: duckbones) seems to have precedence over the file name when selecting a theme. This is not mentioned in the documentation, specifically this line is misleading:

You can use this to modify the builtin themes, by giving the conf file the name Some theme name.conf to override the builtin theme of that name.

@huyz
Copy link

huyz commented Apr 17, 2023

Same. The switching with user-defined themes is broken and I end up with an empty current-theme.conf

@olimorris
Copy link

Yeah I'm having this issue too.

@AdsonCicilioti
Copy link

I'm confirm this bug! The strange thing is that it was working normally. But today after an update no more.

@huyz
Copy link

huyz commented Apr 20, 2023

There's no need to add "me too"s. This issue was closed because it was fixed by Kovid. So you can expect the fix in the next release.

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

No branches or pull requests

5 participants