Open Quadrubo opened 8 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.
I have exactly the same configuration as author and run into the same problem. I think it is quite severe, because dark mode in Gnome is completely broken in libadwaita apps for me.
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.
* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.
Not stale. I am completely unable to use the options for GTK as this issue makes the module settings completely broken.
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