Skip to content

Commit 675eec9

Browse files
chore: package GNOME extension zip v0.1.122
1 parent 7e1682a commit 675eec9

7 files changed

Lines changed: 112 additions & 7 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lay"
3-
version = "0.1.121"
3+
version = "0.1.122"
44
edition = "2021"
55
description = "Double Shift layout rescue for Linux/GNOME Wayland"
66
license = "MIT"

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858

5959
### Установка
6060

61+
Обычная установка ставит всё сразу: Rust-бинарники, user systemd-сервис
62+
`lay-daemon` и GNOME Shell extension.
63+
6164
```bash
6265
git clone https://github.com/radislabus-star/lay-public.git ~/projects/lay
6366
cd ~/projects/lay
@@ -69,6 +72,31 @@ bash install.sh
6972

7073
Потом набери слово не в той раскладке и нажми **Shift два раза**.
7174

75+
### Extension ZIP
76+
77+
Для ручной установки GNOME-расширения или отправки на extensions.gnome.org можно
78+
собрать ZIP:
79+
80+
```bash
81+
bash scripts/package-extension.sh
82+
```
83+
84+
Архив появится в:
85+
86+
```text
87+
dist/gnome-extension/lay@radislabus-star.github.io-<version>.zip
88+
```
89+
90+
Установить только расширение можно так:
91+
92+
```bash
93+
gnome-extensions install --force dist/gnome-extension/lay@radislabus-star.github.io-<version>.zip
94+
gnome-extensions enable lay@radislabus-star.github.io
95+
```
96+
97+
Но для полной работы double Shift всё равно нужен `lay-daemon`, поэтому для
98+
обычных пользователей предпочтителен `bash install.sh`.
99+
72100
### Требования
73101

74102
- Linux
@@ -299,7 +327,7 @@ bash install.sh
299327

300328
### Roadmap
301329

302-
- Более аккуратный public installer и uninstall-команда.
330+
- Uninstall-команда и более дружелюбный release-пакет.
303331
- Короткий demo GIF/video для double Shift.
304332
- Больше регрессионных тестов из реальных принятых/отклонённых исправлений.
305333
- Ещё более понятные privacy-настройки.
@@ -334,6 +362,18 @@ bash install.sh
334362
After installation, log out and log back in so the `input` group and GNOME
335363
extension are picked up.
336364

365+
Extension ZIP for manual install or extensions.gnome.org upload:
366+
367+
```bash
368+
bash scripts/package-extension.sh
369+
gnome-extensions install --force dist/gnome-extension/lay@radislabus-star.github.io-<version>.zip
370+
gnome-extensions enable lay@radislabus-star.github.io
371+
```
372+
373+
The extension alone is only the GNOME Shell bridge and tray UI. The full
374+
double-Shift workflow also needs `lay-daemon`, so normal users should use
375+
`bash install.sh`.
376+
337377
Supported/tested target:
338378

339379
- Linux

VERSIONING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ number from `git rev-list`.
1313

1414
Current publication branch version:
1515

16-
- `0.1.121`
16+
- `0.1.122`
1717

1818
Do not rely on commit counts. Before publishing or pushing, run the bump script
1919
or verify the version fields manually.

extension/lay@radislabus-star.github.io/lay-impl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {getInputSourceManager} from 'resource:///org/gnome/shell/ui/status/keybo
1818

1919
const CONFIG_PATH = GLib.get_home_dir() + '/.config/lay/config.json';
2020
const STATS_PATH = GLib.get_home_dir() + '/.local/share/lay/stats.json';
21-
const APP_VERSION = '0.1.121';
21+
const APP_VERSION = '0.1.122';
2222
const APP_DESCRIPTION = 'Double Shift layout rescue for Linux/GNOME Wayland';
2323
const APP_RELEASE_DATE = '2026-05-09';
2424
const APP_LICENSE = 'MIT';

extension/lay@radislabus-star.github.io/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"uuid": "lay@radislabus-star.github.io",
33
"name": "Lay Layout Switcher",
4-
"version": 121,
5-
"version-name": "0.1.121",
4+
"version": 122,
5+
"version-name": "0.1.122",
66
"description": "GNOME Shell extension для lay-daemon. Показывает EN/RU в трее, переключает раскладку по клику. Минимальный DBus bridge для layout activation и fallback text insert.",
77
"shell-version": ["45", "46", "47", "50"],
88
"url": "https://github.com/radislabus-star/lay-public"

scripts/package-extension.sh

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/usr/bin/env bash
2+
# Build a GNOME Shell extension ZIP for local install or extensions.gnome.org upload.
3+
set -euo pipefail
4+
5+
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
6+
EXT_DIR="$ROOT/extension/lay@radislabus-star.github.io"
7+
OUT_DIR="$ROOT/dist/gnome-extension"
8+
9+
if ! command -v zip >/dev/null; then
10+
echo "zip is required. Install it with: sudo apt-get install zip" >&2
11+
exit 1
12+
fi
13+
if ! command -v unzip >/dev/null; then
14+
echo "unzip is required. Install it with: sudo apt-get install unzip" >&2
15+
exit 1
16+
fi
17+
18+
read -r UUID VERSION_NAME < <(
19+
python3 - "$EXT_DIR/metadata.json" <<'PY'
20+
import json
21+
import sys
22+
from pathlib import Path
23+
24+
metadata = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))
25+
print(metadata["uuid"], metadata["version-name"])
26+
PY
27+
)
28+
29+
mkdir -p "$OUT_DIR"
30+
ZIP_PATH="$OUT_DIR/${UUID}-${VERSION_NAME}.zip"
31+
TMP_DIR="$(mktemp -d)"
32+
trap 'rm -rf "$TMP_DIR"' EXIT
33+
rm -f "$ZIP_PATH"
34+
35+
cp "$EXT_DIR/extension.js" "$TMP_DIR/"
36+
cp "$EXT_DIR/lay-impl.js" "$TMP_DIR/"
37+
python3 - "$EXT_DIR/metadata.json" "$TMP_DIR/metadata.json" <<'PY'
38+
import json
39+
import sys
40+
from pathlib import Path
41+
42+
metadata = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))
43+
# extensions.gnome.org owns the numeric submission version. Keep version-name
44+
# visible in the UI, but don't ship the internal numeric field in the upload ZIP.
45+
metadata.pop("version", None)
46+
Path(sys.argv[2]).write_text(
47+
json.dumps(metadata, ensure_ascii=False, indent=4) + "\n",
48+
encoding="utf-8",
49+
)
50+
PY
51+
52+
(
53+
cd "$TMP_DIR"
54+
zip -X -q "$ZIP_PATH" metadata.json extension.js lay-impl.js
55+
)
56+
57+
echo "Built: $ZIP_PATH"
58+
echo ""
59+
echo "Archive contents:"
60+
unzip -l "$ZIP_PATH"
61+
62+
echo ""
63+
echo "Local extension-only install:"
64+
echo " gnome-extensions install --force \"$ZIP_PATH\""
65+
echo " gnome-extensions enable \"$UUID\""

0 commit comments

Comments
 (0)