From a0e54437fe03b36903faa8b600b6ba903cb15392 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Fri, 24 Jul 2026 12:38:02 +0200 Subject: Add GNOME Shell status indicator --- scripts/install-extension | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 scripts/install-extension (limited to 'scripts') diff --git a/scripts/install-extension b/scripts/install-extension new file mode 100755 index 0000000..2d42288 --- /dev/null +++ b/scripts/install-extension @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -euo pipefail + +root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) +uuid=parley@org.parley +destination=${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/$uuid + +mkdir -p "$(dirname -- "$destination")" +if [[ -L "$destination" ]]; then + unlink "$destination" +elif [[ -e "$destination" ]]; then + rm -rf -- "$destination" +fi +ln -s "$root/extension" "$destination" + +cd "$root" +uv run python - "$uuid" <<'PY' +import sys +from gi.repository import Gio + +uuid = sys.argv[1] +settings = Gio.Settings.new("org.gnome.shell") +enabled = list(settings.get_strv("enabled-extensions")) +if uuid not in enabled: + enabled.append(uuid) + if not settings.set_strv("enabled-extensions", enabled): + raise SystemExit("could not update GNOME's enabled extension list") +PY + +if gnome-extensions info "$uuid" >/dev/null 2>&1; then + gnome-extensions enable "$uuid" + echo "Installed and enabled $uuid from $root/extension" +else + echo "Installed and marked $uuid for enablement." + echo "Log out and back in once so GNOME Shell discovers the new extension." +fi -- cgit v1.3.1