extension-manager icon indicating copy to clipboard operation
extension-manager copied to clipboard

[question] Will CLI be supported, install extensions via manager through commands?

Open zilexa opened this issue 2 years ago • 5 comments

I love this manager. But I have 2 questions:

  1. Will extension manager keep extensions up-to-date that have been installed via Pamac (using AUR)? Because some of the extensions in AUR are not being updated in a timely matter (for example Bing Wallpaper). If I would install Extension Manager (via Pamac/AUR) I wonder if it can keep my other extensions up to date. Currently, extensions installed via Pamac appear under "System Extensions".
  2. Are you planning to add CLI support, using your extension to install extensions via command line?

I ask because I use a post-install script runs after a clean (Manjaro Gnome) install, it takes care of everything and it's like a did not do a clean install, it installs and configures applications, the system and Gnome. I can install everything (including Gnome Extensions) simply via Pamac, it will automatically get the packages via official Manjaro repositories or AUR.

The 2 major downsides: some extensions are outdated in AUR and it requires a reboot to be able to enable them.

If your extension cannot keep extensions installed via Pamac/AUR up to date, it might be better to install them via your extension, but currently there is no way to handle that in a script.

zilexa avatar Apr 09 '22 08:04 zilexa

Second this for setting up a fresh installation of Fedora. :+1:

twiddler avatar Apr 12 '22 17:04 twiddler

Will extension manager keep extensions up-to-date that have been installed via Pamac (using AUR)?

Extension Manager has no way to update or otherwise touch system extensions since they are managed by the system rather than through GNOME Shell itself. It's not really possibly to update them either, as that would interfere with the package manager.

Are you planning to add CLI support, using your extension to install extensions via command line?

I'm very open to it, however I don't see myself having the time to work on this anytime soon. If someone is interested in adding it, I can provide support and review patches.

It should be quite easy to add a CLI interface. I've written this program "library-style" so all of the web interface and extension management logic is separate from the GUI.

I imagine it would work something like this:

  1. Figure out the key operations and define what commands there will be (e.g. search/install/remove/etc). We can do that in this issue. Whichever interface we settle on needs to be stable (at least for 1.0 onwards), otherwise it will break scripts.
  2. Handle command line args inside exm-application.c, or preferably inside a new ExmCommandLine auxiliary object which is called directly from ExmApplication.
  3. Use the existing ExmManager object for managing local extensions and the ExmSearchProvider/ExmDataProvider objects for retrieving extension data from the web. Look at how ExmWindow handles this and basically do the same thing.
  4. If you're feeling particularly adventurous, abstract out the common functionality between ExmWindow and this new ExmCommandLine into an ExmController class.

I'll mark this as "Help Wanted" in case anyone is interested in working on this.

mjakeman avatar Apr 15 '22 02:04 mjakeman

If This app(GUI) can make script to Install extensions again, you can install these easily even on new PC.

oyajun avatar Apr 21 '22 22:04 oyajun

If This app(GUI) can make script to Install extensions again, you can install these easily even on new PC.

@oyajun I'm planning something similar in the form of lists (see #75) - maybe keep an eye on that.

mjakeman avatar Apr 22 '22 06:04 mjakeman

Actually, the main reason I created this, is because GNOME provides zero documentation on how to install apps without involving your browser.

Apparently others had the same issue and someone created a nice script:

This is how I do it now: https://github.com/brunelli/gnome-shell-extension-installer

# get install script 

cd $HOME/Downloads

wget -O gnome-shell-extension-installer.sh "https://github.com/brunelli/gnome-shell-extension-installer/raw/master/gnome-shell-extension-installer

# Install Bing Wallpaper
bash gnome-shell-extension-installer.sh 1262

# Install Walkpaper allowing seperate wallpapers per Workspace

bash gnome-shell-extension-installer.sh 1262 --yes

# Remove gnome-shell-extension-installer script, user will be able to use better Extension Manager to find/install/remove/configure extensions

rm $HOME/Downloads/gnome-shell-extension-installer.sh

zilexa avatar Apr 22 '22 13:04 zilexa

I'm going to close this issue since it's likely out of scope for Extension Manager. Realistically any CLI would have to be a standalone app which is not distributed via flatpak (due to security limitations).

If a particularly adventurous individual wants to make a CLI, I'd recommend looking at the src/web and src/local directories which are completely decoupled from the GUI itself. You can then make a simple CLI using the same building blocks that Extension Manager uses - I'm happy to run you through how it works.

mjakeman avatar Sep 17 '22 23:09 mjakeman