Skip to content
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

Suggestion: kvantum theme #14

Closed
benneti opened this issue Jan 16, 2021 · 3 comments
Closed

Suggestion: kvantum theme #14

benneti opened this issue Jan 16, 2021 · 3 comments

Comments

@benneti
Copy link

benneti commented Jan 16, 2021

Hey,

I looked at your dotfiles for inspiration on how to get qt to respect the dracula theme and found this

# Try really hard to get QT to respect my GTK theme.
env.GTK_DATA_PREFIX = [ "${config.system.path}" ];
env.QT_QPA_PLATFORMTHEME = "gtk2";
qt5 = { style = "gtk2"; platformTheme = "gtk2"; };

as for me this worked not too well (i.e. some remaining white backgrounds and so on).
I took a closer look at the dracula-theme package and found that it includes a kvantum theme which is supported by qtgnomeplatform.
To use this I had to do the following:
(I did not use the qt5 = ... as there the style gets set and for some reason overrides my personal session variables)
Install qgnomeplatform, set QT_QPA_PLATFORMTHEME = "gnome" and QT_STYLE_OVERRIDE="kvantum" and configure kvantum to use dracula

  xdg.configFile = {
    "kvantum.kvconfig" = {
      text = "theme=Dracula";
      target = "Kvantum/kvantum.kvconfig";
    };
    "Dracula-kvantum" = {
      recursive = true;
      source = "${pkgs.dracula-theme}/share/themes/Dracula/kde/kvantum/Dracula";
      target = "Kvantum/Dracula";
    };
  };
@totoroot
Copy link
Contributor

@benneti Thanks for this! This finally made theming for Qt apps work.
I set up the environment variables like you suggested, but chose to create a separate module for kvantum. If someone wants to go this route, here is the configuration for all Kvantum Dracula themes in my dotfiles.
I noticed that Dracula-purple-solid was actually the theme that fit the look of GTK apps best.

@benneti
Copy link
Author

benneti commented Mar 30, 2021

Ah yes, I actually use the solid variant, too.

@hlissner
Copy link
Owner

Sorry for the late response. I've incorporated this in d27f42b; though I'm not 100% sure it works (not using many QT apps these days). In any case, thanks for your help!

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

No branches or pull requests

3 participants