SVG icon theme does not work properly

Hello, everybody, it’s getting a little daunting to setup icon theme. I tried editing GTK config files, adding services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ]. For example, on the pictures the same app can find icon theme when it’s launched via tray, but considers icon theme corrupted when app’s launched via wofi. All the other programs behave like instance that launches via wofi, just ignoring theme. Has anybody stumble upon smthing similar? Thank you.

Full theme config:

{ pkgs, config,  ... }:

{
  stylix = {
    enable = true;
    autoEnable = true;

    cursor = {
      package = pkgs.bibata-cursors;
      name = "Bibata-Modern-Ice";
      size = 24;
    };

    fonts = {
     monospace = {
        package = pkgs.jetbrains-mono;
        name = "JetBrains Mono";
      };

      sizes = {
        terminal = 14;
      };
    };

    image = /home/fly0utwest/nix/img/firewatch-nord.png;
    polarity = "dark";
    base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
  };

  dconf = {
    enable = true;
    settings = {
      "org/gnome/desktop/interface" = {
        color-scheme = "prefer-dark";
      };
    };
  };

  gtk = {
    enable = true;

    iconTheme = {
      name = "Papirus-Dark";
      package = pkgs.papirus-nord;
    };

    gtk3.extraConfig = {
      gtk-application-prefer-dark-theme=1;
    };

    gtk4.extraConfig = {
      gtk-application-prefer-dark-theme=1;
    };
  };
}

This sounds like a wofi issue. How is it currently configured?

I mentioned wofi as an example launcher. I also tried to launch apps from zsh and bash but result is still the same

I see. Did you reboot after making these changes? Sometimes that’s all it takes to fix theming issues.

If that doesn’t work, you might want to try setting:

programs.dconf.enable = true;

Yes, I tried rebooting, didn’t work. I set dconf.enable in both home manager and configuration.nix as well.

I think issue might happen due to broken env var that waybar provides, but the rest of environment can’t access it

Which DE is that by the way? hyprland?

And are there any theming env vars you’re currently setting in your config?

Yep, it’s Hyprland

  env = [
    "XDG_CURRENT_DESKTOP,Hyprland"
    "XDG_SESSION_TYPE,wayland"
    "XDG_SESSION_DESKTOP,Hyprland"
    "XCURSOR_SIZE,24"
    "QT_QPA_PLATFORM,wayland"
    "QT_QPA_PLATFORMTHEME,qt5ct"
    "GTK_THEME,adw-gtk3"
  ];

I tried to find some icon theme variable, but I guess, there’s none

Alright, we should collect more information about which env variables the programs are using.

First, open the program normally from the systray and get its PID

ps ax | grep blueman-manager

Next, replace the PID in the next command to get its env vars:

cat /proc/<PID>/environ | tr '\0' '\n' > normal-icons.log

Now, close the program and re-open it with an app launcher and do the same thing.

Finally, you can compare their outputs and see what’s different:

diff normal-icons.log broken-icons.log

compared outputs, found nothing, but spotted GSETTINGS_BACKEND = "keyfile";in file with env vars, removed it and everything seems fine now. Thank you for your time :slight_smile:

1 Like