NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.04k stars 14.09k forks source link

some programs ignoring my gtk theme #85135

Closed Soundtoxin closed 4 years ago

Soundtoxin commented 4 years ago

Describe the bug transmission-remote-gtk and pcmanfm are showing up white despite my gtk theme being dark and working fine elsewhere (lxappearance and deluge both show up dark)

To Reproduce Steps to reproduce the behavior:

  1. install (for example) pcmanfm and lxappearance
  2. install and select adwaita-dark theme (I think part of gnome-themes-standard)
  3. compare the look of pcmanfm and lxappearance

Expected behavior I would think these should all be dark, or at least the same if not correct.

Screenshots Clockwise from top left, transmission-remote-gtk, deluge, lxappearance 2020-04-13-045407_grim

pcmanfm 2020-04-13-045541_grim

Additional context I've only just realized this issue, so I'm unsure if it was something that broke or if it hasn't worked since I've used these programs. edit: changing the theme in lxappearance to something else will live-update lxappearance and deluge, but transmission-remote-gtk and pcmanfm continue to not change.

Metadata Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: pcmanfm, transmission-remote-gtk
# a list of nixos modules affected by the problem
module:
Emantor commented 4 years ago

What desktop system/compositor/window manager are you using? GTK-3.0 is known to ignore settings in the configuration ini file on wayland managers and will instead look for a dconf database.

Soundtoxin commented 4 years ago

I am using Sway.

doronbehar commented 4 years ago

@Soundtoxin you are mixing QT and GTK based apps in your screenshots. I have transmission-remote-gtk working with the dark theme. I'm not sure how to narrow this down to you but here's the relevant configuration of my system:

    environment.systemPackages = with pkgs; [
      # ...
      gtk3
      gnome3.adwaita-icon-theme
      # ...
    ];

And manually set in my dotfiles:

export GTK_THEME=Adwaita:dark

EDIT: credit - https://wiki.archlinux.org/index.php/GTK#Themes

Soundtoxin commented 4 years ago

you are mixing QT and GTK based apps in your screenshots.

No... I am not doing that. There exists a QT variant of pcmanfm, but I'm using the regular pcmanfm package, not pcmanfm-qt. The other thing failing to be themed literally has gtk in its name, and the themes I'm selecting are gtk themes. (and I see visual changes clicking between adwaita-dark and arc theme, just only in 2/4 of the programs mentioned instead of 4/4)

I'll try your suggestion and see if I can get anything different to happen.

edit: I'm using home-manager, but I've already got gnome3.adwaita-icon-theme installed (this is of course why it shows up in my gtk themes in lxappearance, as seen in my screenshots). Are you sure it's necessary to explicitly list gtk3? Seems like the sort of thing that would be pulled in as-needed. I added the env var to my .zprofile but I am in the middle of some things and don't feel like logging out right now. (and just sourcing the file and restarting transmission-remote-gtk didn't fix the theme, but I'm not surprised by that)

doronbehar commented 4 years ago

You can test it with:

env GTK_THEME=Adwaita:dark transmission-remote-gtk
Soundtoxin commented 4 years ago

You can test it with:

env GTK_THEME=Adwaita:dark transmission-remote-gtk

This works! It actually shows up dark when launched this way. It seems to work for lxappearance and pcmanfm as well. 2020-04-13-170900_grim

So, didn't have to change any packages, just this environment variable. Thank you for the help. Is this not a bug then? Will everyone on Wayland have to do this?

doronbehar commented 4 years ago

Is this not a bug then?

No and that's why I had the suspicion right from the start that lxappearance doesn't handle the GTK theme. I never heard of a graphical program like qt5ct that does the same for GTK apps. Also the Arch Wiki doesn't mention any such package from as far as I know.

So, didn't have to change any packages, just this environment variable. Thank you for the help.

Glad to help :) Please close the issue now.

Soundtoxin commented 4 years ago

No and that's why I had the suspicion right from the start that lxappearance doesn't handle the GTK theme.

It definitely changes the GTK theme before my very eyes for deluge and lxappearance itself as I select different things, it just didn't change for transmission-remote-gtk and pcmanfm. Maybe it's a gtk2/gtk3 difference or something else. I won't bother thinking about it anymore.