NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.31k stars 13.55k forks source link

alpaca: Not using system GTK theme on NixOS #331087

Closed jaredmontoya closed 1 month ago

jaredmontoya commented 1 month ago

Describe the bug

Alpaca does not use system theme configuration. (probably has something to do with flatpak) Affected:

Steps To Reproduce

Steps to reproduce the behavior:

  1. Have customized NixOS system, example: https://github.com/danth/stylix
  2. Set up and run nixpkgs#alpaca on nixos-unstable:

Expected behavior

App follows system theme settings:

Screenshots

Screenshot-20240730-155024

Notify maintainers

@Aleksanaa

Metadata

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

[user@system:~]$ nix run nixpkgs#nix-info -- -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.10.1, NixOS, 24.11 (Vicuna), 24.11.20240727.b73c222`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - nixpkgs: `/nix/store/qxf6anli54ij0q1sdlnlgx9hyl658a4v-source`

Add a :+1: reaction to issues you find important.

Aleksanaa commented 1 month ago

It works for me, with catppuccin-gtk. Maybe there's something to do with your theme? (Is that some simple libadwaita stylesheets?)

Also try setting ADW_DISABLE_PORTAL=1.

jaredmontoya commented 1 month ago

ADW_DISABLE_PORTAL=1 didn't help, I will provide my gtk settings files. (they are symlinks to /nix/store btw) the theme is generated by stylix but under the hood it uses https://search.nixos.org/packages?type=packages&query=adw-gtk

In any other situation I would assume it's a problem with my theme but this is the first time this happened to me on NixOS and I use a lot of gtk apps.

settings.ini

[Settings]
gtk-cursor-theme-name=Bibata-Modern-Ice
gtk-cursor-theme-size=24
gtk-font-name=Inter 12
gtk-icon-theme-name=Papirus-Dark
gtk-theme-name=adw-gtk3

gtk.css

@define-color accent_color #89b4fa;
@define-color accent_bg_color #89b4fa;
@define-color accent_fg_color #1e1e2e;
@define-color destructive_color #f38ba8;
@define-color destructive_bg_color #f38ba8;
@define-color destructive_fg_color #1e1e2e;
@define-color success_color #a6e3a1;
@define-color success_bg_color #a6e3a1;
@define-color success_fg_color #1e1e2e;
@define-color warning_color #cba6f7;
@define-color warning_bg_color #cba6f7;
@define-color warning_fg_color #1e1e2e;
@define-color error_color #f38ba8;
@define-color error_bg_color #f38ba8;
@define-color error_fg_color #1e1e2e;
@define-color window_bg_color #1e1e2e;
@define-color window_fg_color #cdd6f4;
@define-color view_bg_color #1e1e2e;
@define-color view_fg_color #cdd6f4;
@define-color headerbar_bg_color #181825;
@define-color headerbar_fg_color #cdd6f4;
@define-color headerbar_border_color rgba(0.093750, 0.093750, 0.144531, 0.7);
@define-color headerbar_backdrop_color @window_bg_color;
@define-color headerbar_shade_color rgba(0, 0, 0, 0.07);
@define-color headerbar_darker_shade_color rgba(0, 0, 0, 0.07);
@define-color sidebar_bg_color #181825;
@define-color sidebar_fg_color #cdd6f4;
@define-color sidebar_backdrop_color @window_bg_color;
@define-color sidebar_shade_color rgba(0, 0, 0, 0.07);
@define-color secondary_sidebar_bg_color @sidebar_bg_color;
@define-color secondary_sidebar_fg_color @sidebar_fg_color;
@define-color secondary_sidebar_backdrop_color @sidebar_backdrop_color;
@define-color secondary_sidebar_shade_color @sidebar_shade_color;
@define-color card_bg_color #181825;
@define-color card_fg_color #cdd6f4;
@define-color card_shade_color rgba(0, 0, 0, 0.07);
@define-color dialog_bg_color #181825;
@define-color dialog_fg_color #cdd6f4;
@define-color popover_bg_color #181825;
@define-color popover_fg_color #cdd6f4;
@define-color popover_shade_color rgba(0, 0, 0, 0.07);
@define-color shade_color rgba(0, 0, 0, 0.07);
@define-color scrollbar_outline_color #313244;
@define-color blue_1 #89b4fa;
@define-color blue_2 #89b4fa;
@define-color blue_3 #89b4fa;
@define-color blue_4 #89b4fa;
@define-color blue_5 #89b4fa;
@define-color green_1 #a6e3a1;
@define-color green_2 #a6e3a1;
@define-color green_3 #a6e3a1;
@define-color green_4 #a6e3a1;
@define-color green_5 #a6e3a1;
@define-color yellow_1 #f9e2af;
@define-color yellow_2 #f9e2af;
@define-color yellow_3 #f9e2af;
@define-color yellow_4 #f9e2af;
@define-color yellow_5 #f9e2af;
@define-color orange_1 #fab387;
@define-color orange_2 #fab387;
@define-color orange_3 #fab387;
@define-color orange_4 #fab387;
@define-color orange_5 #fab387;
@define-color red_1 #f38ba8;
@define-color red_2 #f38ba8;
@define-color red_3 #f38ba8;
@define-color red_4 #f38ba8;
@define-color red_5 #f38ba8;
@define-color purple_1 #cba6f7;
@define-color purple_2 #cba6f7;
@define-color purple_3 #cba6f7;
@define-color purple_4 #cba6f7;
@define-color purple_5 #cba6f7;
@define-color brown_1 #f2cdcd;
@define-color brown_2 #f2cdcd;
@define-color brown_3 #f2cdcd;
@define-color brown_4 #f2cdcd;
@define-color brown_5 #f2cdcd;
@define-color light_1 #181825;
@define-color light_2 #181825;
@define-color light_3 #181825;
@define-color light_4 #181825;
@define-color light_5 #181825;
@define-color dark_1 #181825;
@define-color dark_2 #181825;
@define-color dark_3 #181825;
@define-color dark_4 #181825;
@define-color dark_5 #181825;
Aleksanaa commented 1 month ago

Yes, I've tried with unset GTK_THEME, and it behaves the same. But there are probably other applications that behave similarly, because I set this environment variable a long time ago for similar reasons. I will try to read its source code later. (this may also be caused by me setting XDG paths)