Open Quadrubo opened 3 months ago
A workaround is to use home.activation
to delete ~/.config/gtk-4.0/gtk.css
for now:
home.activation.removeGTK4Theming = lib.hm.dag.entryAfter ["writeBoundary"] ''rm ${config.xdg.configHome}/gtk-4.0/gtk.css'';
A workaround is to use
home.activation
to delete~/.config/gtk-4.0/gtk.css
for now:
home.activation.removeGTK4Theming = lib.hm.dag.entryAfter ["writeBoundary"] ''rm ${config.xdg.configHome}/gtk-4.0/gtk.css'';
Thank you for the workaround. This is working for now.
@howyay hi!
This also breaks the work of gtk4.extraCss
Is there a way to override gtk4Css so that it doesn't import from the theme? So far I only see the opportunity to copy the module into the configuration and change its behavior. This is clearly not right
This workaround won't work (
home.activation.removeGTK4Theming = lib.hm.dag.entryAfter ["writeBoundary"] ''rm ${config.xdg.configHome}/gtk-4.0/gtk.css'';
home.file."${config.xdg.configHome}/gtk-4.0/gtk.css".text = ''${extraCss}'';
@howyay hi!
This also breaks the work of gtk4.extraCss
Is there a way to override gtk4Css so that it doesn't import from the theme? So far I only see the opportunity to copy the module into the configuration and change its behavior. This is clearly not right
This workaround won't work (
home.activation.removeGTK4Theming = lib.hm.dag.entryAfter ["writeBoundary"] ''rm ${config.xdg.configHome}/gtk-4.0/gtk.css''; home.file."${config.xdg.configHome}/gtk-4.0/gtk.css".text = ''${extraCss}'';
I trust that you probably already figured this out - but its worth noting that there is no need to delete it in the first place if you just wish to overwrite it. Using output redirection >
should discard any existing content and overwrite with your desired content.
I was about to write a new bug report. I am pretty sure that line 291 of this commit is completely broken and forces home manager to always create the gtk4.css file, because the string on line 238 is never going to be empty.
I propose to change 291 from:
xdg.configFile."gtk-4.0/gtk.css" = mkIf (gtk4Css != "") { text = gtk4Css; };
To this:
xdg.configFile."gtk-4.0/gtk.css" = mkIf (cfg4.extraCss != "") { text = gtk4Css; };
It would work the same way the gtk3.css option currently works.
Are you following the right branch?
Is there an existing issue for this?
Issue description
The commit https://github.com/nix-community/home-manager/commit/e9b9ecef4295a835ab073814f100498716b05a96#diff-7d7e3718822ace30b2dc9dd86ef97329bfc89c9262ccad07f5777d0ff3cc8924 introduced a bug for me, as I was using adw-gtk3 to theme legacy applications.
I don't want to theme gtk4 applications with that theme. The manpage for nix also states that
gtk.enable
enables theming for gtk2/3.gtk.theme
says the gtk2/3 theme to use.I don't think setting the theme using this option should automatically apply to all gtk versions. Please note that I'm new to nixos so if one could inform me of any way to overwrite the
gtk4Css
variable this would work for me.However I think a better approach would be to let the user choose themes for each different gtk version. Something like this:
Maintainer CC
@rycee
System information