3

I use one of default themes - Yaru-dark Gtk Theme. I installed it via flatpak as well. The application id is org.gtk.Gtk3theme.Yaru-dark. Some apps that I installed via flatpak follow it, but others do. I noticed, that apps that do not follow it use Gtk4 & libadwaita, so that might be the cause. Is there a way to make also the other apps use the system theme? I tried looking for org.gtk.Gtk4theme.Yaru-dark on flathub, but there is none.

$ flatpak remote-ls flathub | grep -i yaru-dark
Yaru-dark Gtk Theme org.gtk.Gtk3theme.Yaru-dark     3.22

For example baobab uses gtk4 and does not follow the system theme, while mypaint uses gtk3 and follows the system theme.

baobab mypaint

matusf
  • 251
  • 1
  • 4
  • 7

2 Answers2

6

As for now, the flatpak Gtk4 apps support only Adwaita and Adwaita-Dark themes. So one can achieve at least a little consistency when using those, by setting all apps to use it. To do that, one needs to set the theme for system apps, for flatpak apps using Gtk3, and for flatpak apps using Gtk4.

To set the theme for system apps use gnome-tweaks. Change it in an appearance section.

To change the theme for flatpak apps using Gtk3, install the Adwaita or Adwaita-dark from flathub.

flatpak install org.gtk.Gtk3theme.Adwaita-dark

To change the theme for flatpak apps using Gtk4, give apps permissions to access it and set the GTK_THEME environment variable for them. I used flatseal, but it can be done via flatpak cli (you might need sudo).

To locate the theme folder you can use fd or find. (fd adwaita /)

flatpak override --filesystem=/usr/share/themes/
flatpak override --env GTK_THEME=Adwaita-dark
matusf
  • 251
  • 1
  • 4
  • 7
3

As users, we need a little patience sometimes. Ubuntu creates Yaru, and Ubuntu creates Snap. For Snap packages, they adopted to have the Yaru appearance for apps that use libadwaita (GTK4). Had they adopted Flatpak instead, it would already work for Flatpak.

We are not this far yet. This is Free Software, so once someone creates the flatpak, it will work.

vanadium
  • 82,909
  • 6
  • 116
  • 186
  • Snap/Flatpak takes the burden off the developers - you can't implement code for most of the distros - but it breaks the consistent theming. As a developer, I welcome Snap, as a user, I despise it. And even now - snap is one of many (fedora is using flatpak). One of the reasons why linux will not succeed in conquering the desktop [See Linus Torwalts rant about distros](https://www.youtube.com/watch?v=Pzl1B7nB9Kc) – kanehekili Jul 19 '22 at 00:11