How does one GNOME extension know whether another GNOME extension is installed or not

64 Views Asked by At

These are the two GNOME extensions (Dash to Dock and Gnome 4x UI Improvements). If both of them are installed on a system together, then a particular function of the Gnome 4x UI Improvements needs to be delayed by a bit or else the whole Overview of GNOME will be broken. So, how can Gnome 4x UI Improvements know whether Dash to Dock is installed on the system or not? And if installed, whether it is enabled or not. It would also be good if there was any event for it to know whether Dash to Dock has loaded completely. Also, we can just let the pause interval be whether Dash to Dock is installed or not but the default value which was set for that was 500 ms which caused some hiccups in the animation when logging in.

1

There are 1 best solutions below

0
andy.holmes On

It sounds like what you're looking for is the ExtensionManager class, which emits several signals about the state of extensions. You can get the default instance at Main.extensionManager (how you import Main depends on your GNOME Shell version).

However, what "loaded completely" means for Dash-to-Dock and how/if that's communicated to other extensions is up to Dash-to-Dock.