I’m using ~/.config/autostart as a way to call functions in the extension via DBus at startup.
The question is that is the extension system finished to initialize before the execution of .desktops in ~/.config/autostart? I did several tests, looks it’s so. If this is true, I’m very happy to remove the sleep 10 part from the Exec.
And if you know other ways to call functions in extension at startup, please let me know. I don’t like to install a .desktop to ~/.config/autostart, it works but I just don’t like it personally.
Probably what you should be doing is calling these functions in enable() and then reversing whatever they do in disable(). Is there a reason you are running these commands at “startup” rather than when your extension is enabled?
After startup becomes false, will it be reset to true again? For example, the extension is disabled; or it’s disabled and then enabled; and On X11, the gnome shell can be restarted.