ubuntu / yaru

All Ubuntu Yaru GNOME themes
https://community.ubuntu.com/c/desktop/theme-refresh
GNU General Public License v3.0
1.36k stars 182 forks source link

Publish on Flathub please #201

Closed alex285 closed 6 years ago

alex285 commented 6 years ago

..otherwise all Flatpak apps getting Adwaita theme!

Marukesu commented 6 years ago

Flathub only hosts stable application releases, and not development snapshots. Manifests should therefore refer to tarballs or git tags and not the tip of a branch.

so, communitheme needs a stable relase first to be able do publish in flathub

TingPing commented 6 years ago

I've pushed this to Flathub: https://github.com/flathub/org.gtk.Gtk3theme.Communitheme

If any core contributor wants push access to maintain it let me know.

Feichtmeier commented 6 years ago

@TingPing wow thank you! How does the updating works?

TingPing commented 6 years ago

It builds from the git repo so just bump the commit: https://github.com/flathub/org.gtk.Gtk3theme.Communitheme/blob/master/org.gtk.Gtk3theme.Communitheme.json#L60

clobrano commented 6 years ago

I guess flatpak version is a bit outdated :sweat_smile:

image

is it possible to replace commit SHA with some alias like "HEAD"?

Otherwise someone (I can) should step up and updates the commit together with promotion of edge snap branch to stable

TingPing commented 6 years ago

is it possible to replace commit SHA with some alias like "HEAD"?

No, all builds should be of a specific commit and updating is not automated.

Otherwise someone (I can) should step up and updates the commit together with promotion of edge snap branch to stable

I have invited you to the repo with write access. Feel free to update the commit and let me know if you have any questions or somebody else wants access.

clobrano commented 6 years ago

Thanks @TingPing, could you give me some hints (never used flatpak before)? How's the workflow? Once the .json is updated, an automatic build starts? Is it possilble to check the status?

TingPing commented 6 years ago

Once the .json is updated, an automatic build starts? Is it possilble to check the status?

Yes every commit to master will trigger a build that can be viewed here: https://flathub.org/builds/

Github also shows an :heavy_check_mark: or :x: on the commit history that links to builds.

Once a build is completed you can immediately flatpak update to test it out also.

TingPing commented 6 years ago

If you want to debug any problems locally, which honestly shouldn't be too common for your usage, you can run it locally by installing flatpak-builder and running flatpak-builder builddir org.gtk.Gtk3theme.Communitheme.json --force-clean, output is thrown in the builddir.

Further docs: http://docs.flatpak.org/en/latest/

clobrano commented 6 years ago

And what about our shell? Do you think it is possible to have a flatpak for that?

TingPing commented 6 years ago

And what about our shell? Do you think it is possible to have a flatpak for that?

So flatpak is more strict than snap, sandboxing isn't optional and it isn't intended to install files onto the host. You can do really naughty things and bypass the sandboxing but it is really not meant for that.

merlijn-sebrechts commented 6 years ago

Just to give some context on how we use snap for the Gnome Shell theme.

Our theme is strictly sandboxed, a sandbox just doesn't really mean a lot for a theme since a theme doesn't execute anything, it's just a list case rules that the shell applies to itself.

The files of every snap are available on the filesystem in /snap, readable by all. So we tell the shell to look in that directory using the XDG_DATA_DIRS environment variable. This variable is set by the Communitheme session, which is shipped as a regular Ubuntu package and installed by default on any Ubuntu desktop install.

So we don't break out of the sandbox. The Communitheme snap doesn't even run anything, it's files are just used by the shell to theme itself.

Long story short; you could do the same with a flatpak, given that the files of an installed flatpak are available somewhere in the mounted filesystem. Is that the case?

A theme is basically a bunch of

TingPing commented 6 years ago

The files are generally readable in $XDG_DATA_HOME/flatpak/app/org.example.Application/current/active/files/ or /var/lib/flatpak/app/org.example.Application/current/active/files/

TingPing commented 6 years ago

I will say that that is an unconventional use of Flatpak as just a data delivery method. I'm not sure it adds much value if there is a native package providing the session anyway. So I'm not sure if Flathub would want that hosted on it or not, it would be something for us to discuss at least if you really wanted to move forward with that.

clobrano commented 6 years ago

I know nothing about flatpak yet, sorry. I only thought that it would have been looked incomplete without the gnome shell part (not considering the icon part and the sound).

TingPing commented 6 years ago

The Flatpak packaged Gtk theme exists for Flatpak applications. The host is must get the theme via other means already.

Icon themes are passed through to applications so that doesn't need to be packaged.

merlijn-sebrechts commented 6 years ago

I will say that that is an unconventional use of Flatpak as just a data delivery method. I'm not sure it adds much value if there is a native package providing the session anyway. So I'm not sure if Flathub would want that hosted on it or not, it would be something for us to discuss at least if you really wanted to move forward with that.

It would give us the same benefits as the snap: easy delivery of updates controlled by us. However, since nobody asked for it, I won't pursue it further at this moment.

However, it's important that Flatpak apps are themed correctly with Communitheme so we should update the Flatpak theme together with the snap stable release.

I see that @clobrano did just that with the latest stable release, so that means this issue is fixed?

clobrano commented 6 years ago

I see that @clobrano did just that with the latest stable release, so that means this issue is fixed?

Correct, I did it manually, but looking for a way to do it automatically (probably by some script with sed and git locally, still don't know)

Feichtmeier commented 6 years ago

Hi @TingPing

After our name/repo change the flatpak theme is not updated anymore: https://github.com/ubuntu/yaru/issues/688

Could you look into that?

TingPing commented 6 years ago

Somebody made a new repo: https://github.com/flathub/org.gtk.Gtk3theme.Yaru

Can you clarify what your issue is exactly?

Feichtmeier commented 6 years ago

@TingPing oh that's funny. That somebody is @taciturasa who opened the other issue :) So maybe, to deconstruct this, he opened the issue here, tried to fix it on that repo you posted, but forgot to report back what he did :man_shrugging: Then sorry for bothering you.

Yet, I think I found a typo here: https://github.com/flathub/org.gtk.Gtk3theme.Yaru/blob/master/org.gtk.Gtk3theme.Yaru.json#L50 @taciturasa please enlighten us

TingPing commented 6 years ago

Yet, I think I found a typo here

Fixed, though module names don't affect the output package.

Feichtmeier commented 6 years ago

Okay great - would be cool if someone could confirm if this is fixed for flatpaks or not (I don't have flatpak installed)

polyjitter commented 6 years ago

fast fingers and desperation to understand what i'm doing. sorry about that

polyjitter commented 6 years ago

Also: it looks like the flatpak does not, in fact, work. Seriously have no idea what I'm doing; as @TingPing told before, lots of the stuff themes do isn't documented, so I'm kinda lost.

clobrano commented 6 years ago

I am pretty sure at some point this was working, since I was using Builder to test Nautilus and the running application used Yaru. However not it is using Adwaita again

clobrano commented 6 years ago

Installed Gnome Calendar with flatpak. It does download Yaru (see logs below) automatically, however the app uses Adwaita

flatpak install flathub org.gnome.Calendar
Required runtime for org.gnome.Calendar/x86_64/stable (org.gnome.Platform/x86_64/3.28) is not installed, searching...
Found in remote flathub, do you want to install it? [y/n]: y
Installing: org.gnome.Platform/x86_64/3.28 from flathub
[####################] 10 delta parts, 80 loose fetched; 260652 KiB transferred in 62 seconds
Installing: org.freedesktop.Platform.VAAPI.Intel/x86_64/1.6 from flathub
[####################] 1 delta parts, 2 loose fetched; 2621 KiB transferred in 1 seconds
Installing: org.freedesktop.Platform.ffmpeg/x86_64/1.6 from flathub
[####################] 1 delta parts, 2 loose fetched; 2649 KiB transferred in 1 seconds
Installing: org.gtk.Gtk3theme.Yaru/x86_64/3.22 from flathub
[####################] 1 delta parts, 1 loose fetched; 1 KiB transferred in 0 seconds
Installing: org.gnome.Platform.Locale/x86_64/3.28 from flathub
[####################] 4 metadata, 1 content objects fetched; 14 KiB transferred in 0 seconds
Installing: org.gnome.Calendar/x86_64/stable from flathub
[####################] 1 delta parts, 6 loose fetched; 3822 KiB transferred in 2 seconds
Installing: org.gnome.Calendar.Locale/x86_64/stable from flathub
[####################] 3 metadata, 1 content objects fetched; 6 KiB transferred in 0 seconds
polyjitter commented 6 years ago

Only thing I can think of is that the repository combining messed with the build. @TingPing can you confirm that that could be?

clobrano commented 6 years ago

I made a diff with Pop-theme flatpak configuration (that works), and the first difference I saw is the runtime value. Yaru uses org.freedesktop.Sdk, while PopOS org.freedesktop.Platform

@taciturasa Do you mind if I push this change directly on the repository?

polyjitter commented 6 years ago

Nope, no problem. Do whatever you need to get it running :)

On Fri, Aug 24, 2018, 12:40 PM Carlo Lobrano notifications@github.com wrote:

I made a diff with Pop-theme flatpak configuration (that works), and the first difference I saw is the runtime value. Yaru uses org.freedesktop.Sdk, while PopOS org.freedesktop.Platform

@taciturasa https://github.com/taciturasa Do you mind if I push this change directly on the repository?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ubuntu/yaru/issues/201#issuecomment-415814713, or mute the thread https://github.com/notifications/unsubscribe-auth/ARScQCBIDp7PC342ltVgveHg4eFIo8Qqks5uUCyVgaJpZM4SSWw8 .

clobrano commented 6 years ago

Ok done. I assume we need to wait for some CI system to rebuild the package

TingPing commented 6 years ago

What does gsettings get org.gnome.desktop.interface gtk-theme output?

clobrano commented 6 years ago

The output is "Yaru"

TingPing commented 6 years ago

Ok yea the built package is just empty, I'l look into it.

TingPing commented 6 years ago

This should fix it: https://github.com/flathub/org.gtk.Gtk3theme.Yaru/commit/b606be8aba3aa8e5be1f1cfcd7e8cff32d2eb63b

Its an ugly hack and you should add some build time options to disable the unused bits.

polyjitter commented 6 years ago

Awesome ! Is the type: "shell"; what is its the purpose? I see that the other line is excluding what isn't gtk, but I can't tell why the type is listed as shell instead of, say, gtk - unless it's not talking about shell theme? On Fri, Aug 24, 2018, 3:07 PM TingPing notifications@github.com wrote:

This should fix it: flathub/org.gtk.Gtk3theme.Yaru@b606be8 https://github.com/flathub/org.gtk.Gtk3theme.Yaru/commit/b606be8aba3aa8e5be1f1cfcd7e8cff32d2eb63b

Its an ugly hack and you should add some build time options to disable the unused bits.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ubuntu/yaru/issues/201#issuecomment-415854396, or mute the thread https://github.com/notifications/unsubscribe-auth/ARScQMyG9PgmBpH_rrjl7x2b6pdwBbNiks5uUE8HgaJpZM4SSWw8 .

TingPing commented 6 years ago

Awesome ! Is the type: "shell"; what is its the purpose?

It just runs arbitrary commands before building.

clobrano commented 6 years ago

It works now :+1:

image

EDIT: partially working. Icons are not Suru's

image

TingPing commented 6 years ago

Icon themes are always passed through into Flatpak and it doesn't relate to the Gtk theme.

clobrano commented 6 years ago

That's right, also PopOS does not set the icon theme correctly.

closing this then :tada:

On sab, 25 ago, 2018 at 4:11 PM, TingPing notifications@github.com wrote:

Icon themes are always passed through into Flatpak and it doesn't relate to the Gtk theme.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

aviwad commented 6 years ago

Erm, this issue needs to be opened, because for some applications the theming is working (such as Lollypop) and for some, it isn't working (such as Epiphany Web Preview, and the default Python GTK template in Gnome Builder)

EDIT: Nevermind, reinstalling the Yaru theme on flathub and restarting my laptop did the trick. I'm sorry foro this useless message, my bad

ghost commented 6 years ago

Can anyone give me the command to install this..excuse my ignorance. And does it cover the Yaru dark theme also?

TingPing commented 6 years ago

@7im4pple It is automatically installed on any flatpak install or flatpak update. The dark variant is not packaged so that is probably your problem.