lassekongo83 / adw-gtk3

The theme from libadwaita ported to GTK-3
GNU Lesser General Public License v2.1
1.56k stars 57 forks source link

Get the theme listed on flathub #12

Closed CharoSW closed 2 years ago

CharoSW commented 2 years ago

A current bit of pain is that the theme doesn't work with flatpak programs because of the system sandboxing. it would be handy to have it listed so that it applies better on systems that make a lot of use of flatpaks

SilverMarcs commented 2 years ago

Meanwhile use stylpak

dusansimic commented 2 years ago

I could work on this, I've already made a few theme packages for personal use and maintain some flatpak packages on flathub. Ideally, theme should be versioned so new releases could be uploaded on flathub once they land.

lassekongo83 commented 2 years ago

@dusansimic Great! There are however a few things I need to fix before I'll start versioning the theme.

lassekongo83 commented 2 years ago

@dusansimic The theme now has a first version release: https://github.com/lassekongo83/adw-gtk3/releases

dusansimic commented 2 years ago

@lassekongo83 Fantastic 🚀. I've made the first version of the flatpak manifest for the theme and it works however there are two issues, one small and one large.

  1. The flatpak package will need to be named org.gtk.Gtk3theme.adw-gtk3 which stands out capitalization wise (all other themes use kebab-pascal case link). I'm guessing there won't be any particular problem for the package name to be regular kebab case but it might be worth considering changing the name. The problem is that flatpak checks the name of the theme in the system (that would be adw-gtk3 or adw-gtk3-dark) and tries to find a package with the matching name but it's case sensitive. It could be left as is for now untils I send out a pr for adding it to flathub and then we'll see where we stand.
  2. Dark and light theme can't be split up correctly since dark theme is just a symlink to the light theme directory. This creates a problem because flatpak differentiates dark and light theme by having separate packages for each one (see theme list in previous link). If both dark and light theme are in one package, when dark theme is selected (gtk-theme value in dconf i set to adw-gtk3-dark) it falls back to default Adwaita light since there is no org.gtk.Gtk3theme.adw-gtk3-dark pacakge. On the other hand when light theme is selected, it uses the dark adw-gtk3 theme for some reason. I think this should be handled in this repo so themes could be split in other packages too if that's needed. I might be able to help out with this however I haven't had much experience with meson before. I think it could be done with options (arc-theme as an example) so for light/dark package it could be just specified which theme should be built.

I think that is everything for now.

lassekongo83 commented 2 years ago

I guess I need to study some more meson as well.

EDIT: I guess I could use copy instead of symlinking the dark theme. But for some unknown reason I can't get cp to find the assets folder.

#!/bin/sh

set -eu

theme_dir="${MESON_INSTALL_DESTDIR_PREFIX}/$1"
project_name="$2"

install -m755 -d "${theme_dir}"
for ver in gtk-3.0; do
  install -m755 -d "${theme_dir}/${ver}"
  cp -r "gtk/src/${project_name}/${ver}/gtk-dark.css" "${theme_dir}/${ver}/gtk.css"
  cp -r "gtk/src/${project_name}/${ver}/assets" "${theme_dir}/${ver}/assets" # Not working
done
lassekongo83 commented 2 years ago

@dusansimic The dark theme is no longer a symbolic link in the v1.0.1 release.

As for the first issue. I'll wait and see, as renaming the project could cause issues for people when it's updated.

dusansimic commented 2 years ago

Awesome! Theme now seems to work however it would be great if there could be a built package for the theme, at least for now until meson build definition is reworked to support options. I saw that there was one for v1.0 but there isn't one for v1.0.1. Sorry for the back and forth.

I'll probably send a pr for the package on Monday since I'm a bit busy this weekend.

lassekongo83 commented 2 years ago

Added a tar.xz package to the release.

dusansimic commented 2 years ago

@lassekongo83 Theme submissions are merged and published on flathub 🥳.