PortValhalla/scripts/Common/Config/GnomeExtensions/install.sh

45 lines
1.3 KiB
Bash
Executable file

#!/bin/bash
commandName=gnome-shell-extension-installer;
extensionLocation=/usr/share/gnome-shell/extensions;
contextRoot="$(mktemp -d)";
pushd "$contextRoot" > /dev/null;
sudo apt install -y jq;
wget -O "$commandName" "https://github.com/brunelli/gnome-shell-extension-installer/raw/master/gnome-shell-extension-installer";
sudo install "$commandName" /usr/local/bin;
popd > /dev/null;
rm -rf "$contextRoot";
uuids=();
for id in
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
killall -SIGQUIT gnome-shell;