Kitty: GTK theme variants

Created on 16 Mar 2020  路  12Comments  路  Source: kovidgoyal/kitty

Is there a setting to change which variant of a GTK theme (light or dark) kitty will use? Currently, setting it via the GTK_THEME env var won't work. I tested this under Gnome 3.36 with Wayland, kitty 0.16.0:

GTK_THEME=Adwaita:dark kitty

However, what does work is changing the theme after the kitty window has opened using a tool like xprop:

xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT "dark" -name "zsh"

All 12 comments

kitty does not have any knowledge about GTK or link against any GTK
libraries. I assume you mean the theme for the window decorations? Those
are controlled by the window manager, not kitty.

Alacritty can.

kitty does not have any knowledge about GTK or link against any GTK
libraries. I assume you mean the theme for the window decorations? Those
are controlled by the window manager, not kitty.

Is that a "never gonna happen"?

Yes, kitty is never going to link against GTK, or indeed any desktop environment. If you want native window decorations under GNOME, use the X11 backend for kitty, in which case mutter or whatever the idiotic GNOME window manager is called will provide native window decorations, or just ditch GNOME if you want to use Wayland.

Nope, I guess is not GNOME's Client Side Decorators what we are asking here to have. Only to honor that if the global theming is dark, in either GNOME, XFce, Mate, or whatever GTK-based desktop environment you are on; then the color of the Window Title Bar (not the CSD, the Title Bar) to be dark as well.

There is no title bar. Window title bars are part of window decorations.

There is no title bar. Window title bars are part of window decorations.

Exactly what you use X11 (xlib) for.
We would kindly like to ask you to make the X property _GTK_THEME_VARIANT accessible by config (so we may set it to dark).

I am very sorry if we have triggered you. It was not my intention to set you off.

Sorry, I dont get it. If you want to use a dark theme, use one. Set it up in your desktop settings, and if you are using X11, then window decorations are drawn by your desktop environment so they will be respected, automatically. If they are not, open a bug report with your desktop environment.

There is no need for every application to add support for it in any form. Indeed, if whatever desktop environment you are using requires every application to be configured independently for dark mode, its is a frankly ridiculous desktop environment and you should find a better one.

I don't want to use dark theme on all applications. Which could very well be done by a desktop setting.

There is no need for every application to add support for it in any form. Indeed, if whatever desktop environment you are using requires every application to be configured independently for dark mode, its is a frankly ridiculous desktop environment and you should find a better one.

You are right. There is no need. An I am not required to do so. There is just the possibility to do so, and frankly I would like to. That is all. I think Kitty is great and this would be the cherry on top.

If you are not fond of implementing it yourself, never mind. However, would you be willing to accept a pull request?

On Wed, Nov 04, 2020 at 11:40:35PM -0800, 73 wrote:

I don't want to use dark theme on all applications. Which could very well be done by a desktop setting.

There is no need for every application to add support for it in any form. Indeed, if whatever desktop environment you are using requires every application to be configured independently for dark mode, its is a frankly ridiculous desktop environment and you should find a better one.

You are right. There is no need. An I am not required to do so. There is just the possibility to do so, and frankly I would like to. That is all. I think Kitty is great and this would be the cherry on top.

If you are not fond of implementing it yourself, never mind. However, would you be willing to accept a pull request?

Sorry, no I am not adding desktop environment specific settings to
kitty. You can achieve the same effect by simply adding a call to xprop
in your shell rc files. kitty exports the X11 window id as the WINDOWID
environment variable to make this easy.

I see. Thanks. That should be in the FAQ.

It's standard practice, for most linux terminals. I know xterm and urxvt do it, for instance.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jomik picture Jomik  路  4Comments

atomsymbol picture atomsymbol  路  3Comments

reed-jones picture reed-jones  路  4Comments

lazarcf picture lazarcf  路  4Comments

metalelf0 picture metalelf0  路  4Comments