ubuntu-mate / ubuntu-mate-welcome-legacy

The original Ubuntu MATE Welcome based on WebKitGTK. Debuted in 15.04 until 23.10
GNU General Public License v2.0
31 stars 14 forks source link

Integrate snap compatibility for colour themes #101

Open lah7 opened 3 years ago

lah7 commented 3 years ago

ubuntu-mate-colours is now available as a snap to provide compatibility for other snapped applications. Like with Yaru-MATE, the snap alone doesn't show up in Appearance, so it is not be intended to be used as an alternate to the Debian packages.

It would be worthwhile to add logic so installing a colour for the first time installs the snap - but only if snap is installed. Likewise, if the last colour theme is removed, the snap is uninstalled.

Additional logic is required to connect up the snap to existing snaps, to offer a "It just works" experience:

for PLUG in $(snap connections | grep gtk-common-themes:gtk-3-themes | awk '{print $2}'); do sudo snap connect ${PLUG} gtk-theme-yaru-mate:gtk-3-themes; done
for PLUG in $(snap connections | grep gtk-common-themes:gtk-2-themes | awk '{print $2}'); do sudo snap connect ${PLUG} gtk-theme-yaru-mate:gtk-2-themes; done
for PLUG in $(snap connections | grep gtk-common-themes:icon-themes | awk '{print $2}'); do sudo snap connect ${PLUG} icon-theme-yaru-mate:icon-themes; done

Command above was taken from ubuntu-mate/gtk-theme-yaru-mate's README.

Edit: It seems that plugging them up is going to be necessary for newly snaps to use the theme. Unless there's a way to hook at a distro-level, perhaps this could be a "Fixes" thing in the (legacy) Software Boutique, and/or automatically done when installing snaps via the new Software Boutique?