-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdev-reload.sh
More file actions
executable file
·39 lines (35 loc) · 1.52 KB
/
Copy pathdev-reload.sh
File metadata and controls
executable file
·39 lines (35 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# dev-reload.sh — перезагрузить extension без logout
# Если gnome-extensions поддерживает reload — используем его.
# Иначе disable + enable; двухфайловый loader обходит кэш GJS.
UUID="lay@radislabus-star.github.io"
SRC="$(cd "$(dirname "$0")" && pwd)/extension/$UUID"
DST="$HOME/.local/share/gnome-shell/extensions/$UUID"
LAY_GJS_CACHE="$HOME/.cache/lay"
GNOME_VER=$(gnome-shell --version 2>/dev/null | grep -oP '\d+' | head -1)
echo "GNOME Shell $GNOME_VER"
echo "→ sync GNOME extension runtime"
"$(cd "$(dirname "$0")" && pwd)/scripts/check-gnome-extension-runtime.sh" --fix --reload
for _ in $(seq 1 20); do
gdbus call --session \
--dest org.gnome.Shell \
--object-path /io/github/radislabus_star/LayDaemon \
--method io.github.radislabus_star.LayDaemon.Version >/dev/null 2>&1 && break
sleep 0.1
done
systemctl --user restart lay-daemon
LOADED_VERSION="$(
gdbus call --session \
--dest org.gnome.Shell \
--object-path /io/github/radislabus_star/LayDaemon \
--method io.github.radislabus_star.LayDaemon.Version 2>/dev/null \
| sed -n "s/.*'\([^']*\)'.*/\1/p" \
|| true
)"
if [ -n "$LOADED_VERSION" ]; then
echo "✓ загруженная версия extension: $LOADED_VERSION"
else
echo "⚠ не удалось проверить загруженную версию extension через DBus"
fi
"$(cd "$(dirname "$0")" && pwd)/scripts/check-gnome-extension-runtime.sh"
echo "✓ готово"