Yaru: Yaru not showing up on Unity Tweak Tool

Created on 14 Oct 2019  路  3Comments  路  Source: ubuntu/yaru

I had to use GNOME Tweak Tool to enable Yaru. Is there a way for Yaru to pop up on Unity Tweak Tool and the Appearance section in the settings?

Unity not-fixable

Most helpful comment

@Feichtmeier It is because Yaru doesn't have the 'metacity-1' directory, which is one of the required directories for any theme to appear in the Unity Tweak Tool (it is not a CSS fix). I've done a pull request in the Unity Tweak Tool for Yaru to appear in it, by removing 'metacity-1' from the required directories list (https://github.com/freyja-dev/unity-tweak-tool/pull/140/). Meanwhile, I've fixed it in Unity Tweak Tool in Ubuntu Unity 20.04.1. Also, the AskUbuntu answer is not relevant to Yaru.

@YamiYukiSenpai I'm not sure if you are using Ubuntu Unity 20.04.1, in which Yaru appears in Unity Tweak Tool. If you are not, you can edit the file /usr/lib/python3/dist-packages/UnityTweakTool/section/spaghetti/theme.py and replace required=['gtk-2.0','gtk-3.0','metacity-1'] with required=['gtk-2.0','gtk-3.0'] on line 58 of the file. Reopen Unity Tweak Tool, and Yaru should now appear in the Appearance (Themes) section of the Unity Tweak Tool. You can divert the edited file using dpkg-divert (check the manpage for help using it) so that the fix does not get removed on an update of the unity-tweak-tool package (you can remove the diversion once the pull-request mentioned above is merged into Unity Tweak Tool). Yaru doesn't appear in the Unity Control Center because only Adwaita, Ambiance, Radiance and High Contrast (no other theme) have been hardcoded in the source code of Unity Control Center (in https://bazaar.launchpad.net/~unity-control-center-team/unity-control-center/trunk/view/head:/panels/appearance/cc-appearance-panel.c), and thus it cannot be fixed in Unity Control Center unless Yaru is added to the hardcoded list, which I don't think will be done, as yaru-theme-unity is not included in Unity7 by default. This issue in Unity Control Center is present using other themes like the Arc theme as well. It was like this in old versions of Ubuntu using Unity7 (like 16.04) as well, thus it was recommended to use the Unity Tweak Tool for advanced theming and customization.

All 3 comments

Please report this problem at https://launchpad.net/unity-tweak-tool

TIA

Hi @YamiYukiSenpai

I have no idea why it does not show up in the unity tweak tool.
But we officially only support the GNOME3 desktop. I don't know what modifications are needed to make it show up, but I think this is a bit out of scope for us.
We have provide a gtk3 theme that is 100% compliant with the gnome3 desktop.
I made some rough fixes to make the unity theme work and I can see us improving it if the right CSS is found for this. But this answer might help you: https://askubuntu.com/a/1032115

@Feichtmeier It is because Yaru doesn't have the 'metacity-1' directory, which is one of the required directories for any theme to appear in the Unity Tweak Tool (it is not a CSS fix). I've done a pull request in the Unity Tweak Tool for Yaru to appear in it, by removing 'metacity-1' from the required directories list (https://github.com/freyja-dev/unity-tweak-tool/pull/140/). Meanwhile, I've fixed it in Unity Tweak Tool in Ubuntu Unity 20.04.1. Also, the AskUbuntu answer is not relevant to Yaru.

@YamiYukiSenpai I'm not sure if you are using Ubuntu Unity 20.04.1, in which Yaru appears in Unity Tweak Tool. If you are not, you can edit the file /usr/lib/python3/dist-packages/UnityTweakTool/section/spaghetti/theme.py and replace required=['gtk-2.0','gtk-3.0','metacity-1'] with required=['gtk-2.0','gtk-3.0'] on line 58 of the file. Reopen Unity Tweak Tool, and Yaru should now appear in the Appearance (Themes) section of the Unity Tweak Tool. You can divert the edited file using dpkg-divert (check the manpage for help using it) so that the fix does not get removed on an update of the unity-tweak-tool package (you can remove the diversion once the pull-request mentioned above is merged into Unity Tweak Tool). Yaru doesn't appear in the Unity Control Center because only Adwaita, Ambiance, Radiance and High Contrast (no other theme) have been hardcoded in the source code of Unity Control Center (in https://bazaar.launchpad.net/~unity-control-center-team/unity-control-center/trunk/view/head:/panels/appearance/cc-appearance-panel.c), and thus it cannot be fixed in Unity Control Center unless Yaru is added to the hardcoded list, which I don't think will be done, as yaru-theme-unity is not included in Unity7 by default. This issue in Unity Control Center is present using other themes like the Arc theme as well. It was like this in old versions of Ubuntu using Unity7 (like 16.04) as well, thus it was recommended to use the Unity Tweak Tool for advanced theming and customization.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mivoligo picture mivoligo  路  3Comments

Feichtmeier picture Feichtmeier  路  3Comments

matthewpaulthomas picture matthewpaulthomas  路  3Comments

sicklylife-jp picture sicklylife-jp  路  3Comments

mivoligo picture mivoligo  路  3Comments