catppuccin / nix

❄️ Soothing pastel theme for Nix
https://nix.catppuccin.com/
MIT License
358 stars 48 forks source link

bug: `ctp.kvantum` does not allow `qt.platformTheme.name = qtct` #275

Open zspher opened 2 months ago

zspher commented 2 months ago

ctp.kvantum does not allow qt.platformTheme.name = qtct. I use qtct to set icon theme and fonts while using kvantum.

 { lib, ...}: let
  data = {
    Appearance = {
      custom_palette = false;
      icon_theme = "Papirus-Dark";
      standard_dialogs = "default";
      style = "kvantum-dark";
    };

    Fonts = {
      fixed = "\"CaskaydiaMono Nerd Font Mono,10,-1,5,50,0,0,0,0,0,Regular\"";
      general = "\"Sans Serif,10,-1,5,50,0,0,0,0,0,Regular\"";
    };
  };
in {
  qt = {
    enable = true;
    style.name = "kvantum";
    platformTheme.name = "qtct";
    # platformTheme.name = "kvantum";
  };
  xdg.configFile."qt5ct/qt5ct.conf".text = lib.generators.toINI {} data;
  xdg.configFile."qt6ct/qt6ct.conf".text = lib.generators.toINI {} data;
}

So if possible can qtct be made an exception in https://github.com/catppuccin/nix/blob/9345073d27d91ab66c1b6ab65df322906992aa59/modules/home-manager/kvantum.nix#L43

heitorPB commented 1 month ago

Did you find a solution/workaround to this?

zspher commented 1 month ago

Did you find a solution/workaround to this?

nope, just didn't use catppuccin/nix for kvantum, configured it in home-manager manually

heitorPB commented 1 month ago

Would you be so kind to share your configuration? I've been trying to get Qt themed but only frustrations so far.

zspher commented 1 month ago

sure,

  qt = let
    upperFirst = str:
    (lib.toUpper (builtins.substring 0 1 str))
    + (builtins.substring 1 (builtins.stringLength str) str);
    flavorCapitalized = upperFirst config.catppuccin.flavor;
    accentCapitalized = upperFirst config.catppuccin.accent;
  in {
    enable = true;
    platformTheme.name = "qtct";
    style.name = "kvantum";
    kde.settings."Kvantum/kvantum.kvconfig".General.theme = "Catppuccin-${flavorCapitalized}-${accentCapitalized}";
  };

ref:

heitorPB commented 1 month ago

Thank you!