-
-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gtk: add support for theming Flatpak apps #693
Conversation
This support can be enabled using `targets.gtk.flatpakSupport.enable`. It is likey incompatible with other modules that write to this file and is therefore disabled by default.
I added support for nix-flatpak overrides. If nix-flatpak is imported externally, its option is used for compatibility purposes. Otherwise, file is manually created. Sadly this solution is not very easy to read and maintain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall approach looks good.
This uses stdenvNoCC as a more lightweight alternative to stdenv. Co-authored-by: NAHO <[email protected]>
This is the more conventional method and enables the option by default. Co-authored-by: NAHO <[email protected]>
Thanks for updating your review! I may be slow to respond and will take more time testing the suggested changes during the festive season, just so you know. |
Uses the `?` operator instead of `lib.hasAttrByPath`. Co-authored-by: NAHO <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great job!
Reviewed-by: NAHO <[email protected]>
I do not have any Flatpak applications to test this patchset, but I can confirm that this does not break non-Flatpak applications:
Tested-by: NAHO <[email protected]>
I'm having some issues with this, flatpaked GTK apps are fully transparent for me. I do use nix-flatpak, but I don't have any specific configuration, feel free to check out my config. |
Add support for theming Flatpak applications by making the GTK theme accessible to them. [1] [1]: https://itsfoss.com/flatpak-app-apply-theme Closes: #465 Link: #693 Reviewed-by: NAHO <[email protected]> Tested-by: NAHO <[email protected]> (cherry picked from commit 963e77a)
Successfully created backport PR for |
Add support for theming Flatpak applications by making the GTK theme accessible to them. [1] [1]: https://itsfoss.com/flatpak-app-apply-theme Closes: #465 Link: #693 Reviewed-by: NAHO <[email protected]> Tested-by: NAHO <[email protected]> (cherry picked from commit 963e77a)
I just noticed some other potential issues with the current implementation. It's discouraged to use gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3' Flatpak apps shouldn't be able to access Perhaps I'll find a solution that just uses |
Note that |
Resolves #465 and adds support for theming Flatpak apps by making the GTK theme accessible to them. This support can be enabled using
targets.gtk.flatpakSupport.enable
. See this article for an in-depth explanation of Flatpak theming.To enable Flatpak theming support, this module writes to Flatpak's overrides configuration which currently does not have a dedicated Home Manager option. It might therefore create conflicts with other modules that write directly to this file, such as those defined by
nix-flatpak
.Here are some Flatpak apps with a Catppuccin GTK theme.
See #465 (comment) and replies for previous discussions on this matter.