Add script for installing gnome extensions
This commit is contained in:
parent
bc1bf40da9
commit
fffcb57364
2 changed files with 13 additions and 29 deletions
9
scripts/Common/Config/GnomeExtensions/install-extension.sh
Executable file
9
scripts/Common/Config/GnomeExtensions/install-extension.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
function installExtension() {
|
||||
local -n queue="$1";
|
||||
|
||||
for id in ${queue[@]}
|
||||
do
|
||||
gnome-shell-extension-installer "$id" --yes;
|
||||
done;
|
||||
}
|
|
@ -1,39 +1,14 @@
|
|||
#!/bin/bash
|
||||
extensionLocation=/usr/share/gnome-shell/extensions;
|
||||
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
. "../../gnome-shell-extension-installer/install.sh";
|
||||
uuids=();
|
||||
. "./install-extension.sh";
|
||||
|
||||
for id in
|
||||
extensions=(
|
||||
5278 # pano https://extensions.gnome.org/extension/5278/pano/
|
||||
4907 # EasyEffects Preset Selector https://extensions.gnome.org/extension/4907/easyeffects-preset-selector/
|
||||
1162 # Emoji Selector https://extensions.gnome.org/extension/1162/emoji-selector/
|
||||
do
|
||||
contextRoot="$(mktemp -d)";
|
||||
unzipLocation="$(mktemp -d)";
|
||||
pushd "$contextRoot" > /dev/null;
|
||||
|
||||
gnome-shell-extension-installer "$id" --no-install;
|
||||
sudo gnome-shell-extension-installer "$id" --yes;
|
||||
unzip ./*.zip -d "$unzipLocation";
|
||||
|
||||
uuid="$(jq -r '.uuid' "$unzipLocation/metadata.json")";
|
||||
uuids+=("$uuid");
|
||||
|
||||
sudo chmod -R +r "$extensionLocation/$uuid";
|
||||
|
||||
popd > /dev/null;
|
||||
rm -rf "$contextRoot";
|
||||
done
|
||||
|
||||
killall -SIGQUIT gnome-shell;
|
||||
sleep 3;
|
||||
|
||||
for uuid in ${uuids[@]}
|
||||
do
|
||||
gnome-extensions enable "$uuid";
|
||||
done
|
||||
);
|
||||
|
||||
installExtension extensions;
|
||||
killall -SIGQUIT gnome-shell;
|
||||
popd > /dev/null;
|
||||
|
|
Loading…
Reference in a new issue