@hnode/tidy 0.20.1 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/bin/tidy.js +7 -4
- package/desktop/package-lock.json +2 -2
- package/desktop/package.json +1 -1
- package/dist/{winubun@winubun.local.shell-extension.zip → tidy@hnode.shell-extension.zip} +0 -0
- package/docs/DEVELOPMENT.md +6 -3
- package/docs/MACOS.md +1 -1
- package/docs/README.en.md +5 -3
- package/docs/RELEASING.md +14 -14
- package/lib/translations.json +6 -2
- package/metadata.json +2 -2
- package/package.json +2 -2
- package/scripts/manage.py +71 -11
package/README.md
CHANGED
|
@@ -159,7 +159,7 @@ tidy status
|
|
|
159
159
|
CLI 없이 설치된 관리 도구를 직접 실행할 수도 있습니다. 원본 소스 폴더는 필요하지 않습니다.
|
|
160
160
|
|
|
161
161
|
```bash
|
|
162
|
-
tidy_manager="${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/
|
|
162
|
+
tidy_manager="${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/tidy@hnode/scripts/manage.py"
|
|
163
163
|
/usr/bin/python3 "$tidy_manager" prefs
|
|
164
164
|
/usr/bin/python3 "$tidy_manager" status
|
|
165
165
|
```
|
|
@@ -182,6 +182,8 @@ git pull --ff-only
|
|
|
182
182
|
|
|
183
183
|
확장 코드의 버전이 바뀌면 로그아웃 후 다시 로그인하세요. GNOME은 로그인 중 불러온 JavaScript를 캐시하므로 확장을 껐다 켜는 것만으로는 새 코드가 적용되지 않습니다. 기존 설정과 단축키는 유지합니다.
|
|
184
184
|
|
|
185
|
+
설치·업데이트 완료 시 재로그인 안내를 표시합니다. 적용을 기다리는 경우에는 **[재로그인 필요]** 문구가 나오며, 다음 로그인에서 자동으로 활성화됩니다. 재로그인 전에는 `tidy status`에서도 안내를 확인할 수 있습니다. 같은 확장 코드가 이미 로드되어 있으면 이번에는 재로그인이 필요하지 않다고 안내합니다.
|
|
186
|
+
|
|
185
187
|
## Uninstall
|
|
186
188
|
|
|
187
189
|
확장을 먼저 제거하고 npm CLI를 제거합니다.
|
|
@@ -196,14 +198,14 @@ npx로 설치했다면 `npx @hnode/tidy@latest uninstall`을 사용하세요. **
|
|
|
196
198
|
CLI가 없어도 어느 폴더에서든 설치된 도구로 제거할 수 있습니다.
|
|
197
199
|
|
|
198
200
|
```bash
|
|
199
|
-
/usr/bin/python3 "${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/
|
|
201
|
+
/usr/bin/python3 "${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/tidy@hnode/scripts/manage.py" uninstall
|
|
200
202
|
```
|
|
201
203
|
|
|
202
204
|
확장과 앱 실행기를 제거하고, 변경했던 GNOME 설정과 기존 타일링 확장 상태를 복원합니다. Tidy의 사용자 설정과 단축키는 재설치를 위해 보관합니다.
|
|
203
205
|
|
|
204
206
|
기존 타일링 확장의 사용자 설치본을 삭제하여 현재 세션에서 인식되지 않는 경우, 남아 있는 시스템 원본을 다음 로그인에 활성화하도록 설정하고 Tidy 제거를 완료합니다. 이 경우 출력 안내에 따라 다시 로그인하세요. 이전 확장이 시스템에서도 제거됐다면 재설치하지 않습니다.
|
|
205
207
|
|
|
206
|
-
|
|
208
|
+
확장 관리자에 표시되는 UUID는 `tidy@hnode`입니다. `tidy update`는 기존 `winubun@winubun.local` 또는 `tidy@hnode.dev` 설치를 새 UUID로 이전합니다. 기존 설정과 단축키는 유지하며, 설정 저장소·상태 폴더·고정한 실행기 파일의 `winubun` 이름은 호환성을 위해 유지합니다.
|
|
207
209
|
|
|
208
210
|
## Notes
|
|
209
211
|
|
package/bin/tidy.js
CHANGED
|
@@ -11,6 +11,7 @@ const root = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
|
11
11
|
const metadata = JSON.parse(readFileSync(join(root, 'metadata.json'), 'utf8'));
|
|
12
12
|
const manifest = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
|
|
13
13
|
const catalogs = JSON.parse(readFileSync(join(root, 'lib/translations.json'), 'utf8'));
|
|
14
|
+
const legacyUuids = ['tidy@hnode.dev', 'winubun@winubun.local'];
|
|
14
15
|
const commands = ['install', 'update', 'uninstall', 'prefs', 'status', 'doctor'];
|
|
15
16
|
|
|
16
17
|
export function main({args = process.argv.slice(2), env = process.env, platform = process.platform,
|
|
@@ -68,13 +69,15 @@ export function main({args = process.argv.slice(2), env = process.env, platform
|
|
|
68
69
|
return 0;
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
const data = env.XDG_DATA_HOME || join(homedir(), '.local/share');
|
|
73
|
+
const installed = [metadata.uuid, ...legacyUuids]
|
|
74
|
+
.map(uuid => join(data, 'gnome-shell/extensions', uuid, 'scripts/manage.py'))
|
|
75
|
+
.find(path => existsSync(path));
|
|
76
|
+
if (['prefs', 'status'].includes(command) && !installed) {
|
|
74
77
|
error(_('Tidy is not installed. Run tidy install first.'));
|
|
75
78
|
return 1;
|
|
76
79
|
}
|
|
77
|
-
const manager = installing || !
|
|
80
|
+
const manager = installing || !installed ? join(packageRoot, 'scripts/manage.py') : installed;
|
|
78
81
|
const parameters = [manager, installing ? 'install' : command];
|
|
79
82
|
if (installing) {
|
|
80
83
|
const archive = join(packageRoot, 'dist', `${metadata.uuid}.shell-extension.zip`);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tidy-desktop",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "tidy-desktop",
|
|
9
|
-
"version": "0.20.
|
|
9
|
+
"version": "0.20.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"electron": "45.2.3"
|
|
12
12
|
}
|
package/desktop/package.json
CHANGED
|
Binary file
|
package/docs/DEVELOPMENT.md
CHANGED
|
@@ -16,7 +16,7 @@ npm run check
|
|
|
16
16
|
npm run test:package
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
빌드 결과는 `dist/
|
|
19
|
+
빌드 결과는 `dist/tidy@hnode.shell-extension.zip`입니다. 런타임 소스, 컴파일한 스키마, 설치·복구 도구와 GPL 라이선스 파일을 포함합니다.
|
|
20
20
|
|
|
21
21
|
npm 배포 이름은 `@hnode/tidy`이고 실행 파일은 `bin/tidy.js`입니다. `npm pack`은 `prepack`에서 Node.js로 확장 ZIP을 빌드합니다. 이 빌드는 macOS에서도 Python 없이 동작합니다. GLib 컴파일러가 없는 환경에서는 XML 스키마를 포함하고 GNOME 설치 시 컴파일합니다. 사용자 설치 시에는 이 ZIP을 사용하므로 npm 패키지 경로가 읽기 전용이어도 됩니다. 게시 절차와 tarball 검증은 [Releasing](RELEASING.md)을 참고하세요.
|
|
22
22
|
|
|
@@ -27,6 +27,8 @@ npm 배포 이름은 `@hnode/tidy`이고 실행 파일은 `bin/tidy.js`입니다
|
|
|
27
27
|
```bash
|
|
28
28
|
GSETTINGS_BACKEND=memory GSETTINGS_SCHEMA_DIR="$PWD/schemas" gjs -m tests/lease-smoke.js
|
|
29
29
|
/usr/bin/python3 scripts/test-shell.py
|
|
30
|
+
/usr/bin/python3 scripts/test-shell.py --migration-only
|
|
31
|
+
TIDY_TEST_LEGACY_UUID=tidy@hnode.dev /usr/bin/python3 scripts/test-shell.py --migration-only
|
|
30
32
|
```
|
|
31
33
|
|
|
32
34
|
Shell 통합 테스트는 GNOME 50의 `gnome-shell-test-tool`과 가상 모니터를 지원하는 그래픽 환경이 필요합니다. 별도 D-Bus, 런타임 디렉터리, 설정 저장소와 헤드리스 Wayland 세션에서 동작합니다.
|
|
@@ -51,6 +53,7 @@ Ubuntu Dock이 설치된 환경에서는 `TIDY_TEST_UBUNTU_DOCK=1 /usr/bin/pytho
|
|
|
51
53
|
- 제거 전 확장 종료 확인, 기존 확장 복원 상태 검증과 삭제된 사용자 확장의 시스템 원본을 다음 로그인에 복원
|
|
52
54
|
- npm tarball 전역 설치, 읽기 전용 패키지, CLI 언어·의존성 검사와 설치된 복구 도구 연결
|
|
53
55
|
- 확장 재활성화·빠른 켜기/끄기, 예약 작업 취소와 데스크톱 설정 복원
|
|
56
|
+
- `winubun@winubun.local`에서 `tidy@hnode`로 이전, 이전 확장 종료·제거와 설정 유지, 업데이트 후 재로그인 안내
|
|
54
57
|
- 상단 한 행 선택기와 최대화 버튼 3열 × 2행 선택기의 개별 배치·클릭·드래그
|
|
55
58
|
- Super+A 앱 목록에서 선택기·드롭 영역·추가 검색 여백 해제와 창 보기 복귀
|
|
56
59
|
- 중첩된 Chromium 제목 표시줄, 한국어 ‘복구’ 버튼, 창 그림자를 포함한 접근성 좌표 변환
|
|
@@ -65,7 +68,7 @@ Ubuntu Dock이 설치된 환경에서는 `TIDY_TEST_UBUNTU_DOCK=1 /usr/bin/pytho
|
|
|
65
68
|
|
|
66
69
|
| 경로 | 용도 |
|
|
67
70
|
| --- | --- |
|
|
68
|
-
| `~/.local/share/gnome-shell/extensions/
|
|
71
|
+
| `~/.local/share/gnome-shell/extensions/tidy@hnode/` | 확장과 설치된 관리 도구 |
|
|
69
72
|
| `~/.local/share/applications/winubun.desktop` | Tidy 실행기 |
|
|
70
73
|
| `~/.local/state/winubun/launcher.log` | 실행 오류 |
|
|
71
74
|
| `~/.local/state/winubun/preferences.log` | 설정 앱 로그 |
|
|
@@ -73,7 +76,7 @@ Ubuntu Dock이 설치된 환경에서는 `TIDY_TEST_UBUNTU_DOCK=1 /usr/bin/pytho
|
|
|
73
76
|
|
|
74
77
|
```bash
|
|
75
78
|
gnome-shell --version
|
|
76
|
-
gnome-extensions info
|
|
79
|
+
gnome-extensions info tidy@hnode
|
|
77
80
|
journalctl --user -b --no-pager -g 'Tidy|winubun|JS ERROR'
|
|
78
81
|
```
|
|
79
82
|
|
package/docs/MACOS.md
CHANGED
|
@@ -18,7 +18,7 @@ tidy doctor
|
|
|
18
18
|
tidy install
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
0.20.
|
|
21
|
+
0.20.2 배포본을 버전 고정으로 테스트하는 절차는 [배포본 Mac 테스트](RELEASING.md#test-the-published-package-on-mac)에 있습니다. 전역 설치 없이 `npx --yes @hnode/tidy@0.20.2 install`로도 설치할 수 있습니다.
|
|
22
22
|
|
|
23
23
|
소스의 변경 사항을 사용하려면 저장소에서 실행하세요.
|
|
24
24
|
|
package/docs/README.en.md
CHANGED
|
@@ -160,7 +160,7 @@ tidy status
|
|
|
160
160
|
You can also use the installed management tool directly. The source folder is not needed:
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
|
-
tidy_manager="${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/
|
|
163
|
+
tidy_manager="${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/tidy@hnode/scripts/manage.py"
|
|
164
164
|
/usr/bin/python3 "$tidy_manager" prefs
|
|
165
165
|
/usr/bin/python3 "$tidy_manager" status
|
|
166
166
|
```
|
|
@@ -183,6 +183,8 @@ git pull --ff-only
|
|
|
183
183
|
|
|
184
184
|
Log out and back in when the extension code version changes. GNOME caches JavaScript for the session, so toggling the extension does not reload it. Existing settings and shortcuts are preserved.
|
|
185
185
|
|
|
186
|
+
Installation and updates always show a login notice. If the new code is waiting to be applied, **[Login required]** tells you to log out and back in; Tidy starts automatically at the next login. `tidy status` also shows the reminder until the new code is registered. Reinstalling code that is already loaded explains that no logout is needed this time.
|
|
187
|
+
|
|
186
188
|
## Uninstall
|
|
187
189
|
|
|
188
190
|
Remove the extension first, then the npm CLI:
|
|
@@ -197,14 +199,14 @@ For npx installations, use `npx @hnode/tidy@latest uninstall`. **Removing only t
|
|
|
197
199
|
Without the CLI, run the installed tool from any directory:
|
|
198
200
|
|
|
199
201
|
```bash
|
|
200
|
-
/usr/bin/python3 "${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/
|
|
202
|
+
/usr/bin/python3 "${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/tidy@hnode/scripts/manage.py" uninstall
|
|
201
203
|
```
|
|
202
204
|
|
|
203
205
|
This removes the extension and application launcher and restores the GNOME settings and competing tiling-extension state that Tidy changed. Tidy's custom settings and shortcuts are kept for reinstallation.
|
|
204
206
|
|
|
205
207
|
If removing a user-installed tiling extension made its UUID unavailable in the current session, the uninstaller enables any remaining system copy for the next login and completes Tidy removal. Log out and back in when prompted. An extension removed from the system entirely is not reinstalled.
|
|
206
208
|
|
|
207
|
-
The `winubun`
|
|
209
|
+
The UUID shown in extension managers is `tidy@hnode`. `tidy update` migrates an existing `winubun@winubun.local` or `tidy@hnode.dev` installation to the new UUID and preserves settings and shortcuts. The settings schema, state directory and launcher retain their internal `winubun` names for compatibility.
|
|
208
210
|
|
|
209
211
|
## Notes
|
|
210
212
|
|
package/docs/RELEASING.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Tidy는 **@hnode/tidy**라는 공개 npm 패키지로 배포합니다. `tidy` CLI, GNOME 확장 ZIP과 macOS 데스크톱 앱 소스를 포함합니다. 루트 패키지에는 런타임 npm 의존성이 없고, macOS의 명시적 `tidy install` 시 별도 사용자 폴더에 고정 버전의 Electron을 설치합니다. 확장 ZIP과 데스크톱 설치에는 GPL 소스와 라이선스 파일을 포함합니다.
|
|
4
4
|
|
|
5
|
-
현재 배포 준비 버전은 **0.20.
|
|
5
|
+
현재 배포 준비 버전은 **0.20.2**입니다. macOS 설치·업데이트·제거, 메뉴 막대 선택기, Control+Option 단축키와 Swift Accessibility 창 제어를 포함합니다. GNOME의 남은 공간 선택기는 창별 실시간 미리보기와 제목을 표시하며, 확장 UUID는 `tidy@hnode`, 내부 버전은 **24**입니다. 기존 UUID에서 설정을 유지해 이전하며, 설치·업데이트 완료 시 재로그인 필요 여부를 안내합니다. Mac의 실제 창 조작은 배포본을 받은 뒤 검증하며, 자동 검사 통과와 구분합니다.
|
|
6
6
|
|
|
7
7
|
## Prepare
|
|
8
8
|
|
|
@@ -15,8 +15,8 @@ npm run check
|
|
|
15
15
|
npm run test:package
|
|
16
16
|
npm pack --dry-run
|
|
17
17
|
npm pack --pack-destination dist
|
|
18
|
-
node tests/npm-package-smoke.js dist/hnode-tidy-0.20.
|
|
19
|
-
sha256sum dist/hnode-tidy-0.20.
|
|
18
|
+
node tests/npm-package-smoke.js dist/hnode-tidy-0.20.2.tgz
|
|
19
|
+
sha256sum dist/hnode-tidy-0.20.2.tgz
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
`prepack`이 Node.js로 최신 소스의 확장 ZIP을 다시 빌드합니다. GNOME 배포용 tarball은 `glib-compile-schemas`가 있는 Linux에서 빌드해 컴파일한 스키마까지 검증하세요. macOS에서는 GLib 없이 소스 스키마를 포함한 ZIP을 만들 수 있습니다. 공개 파일은 `package.json`의 `files` 목록으로 제한합니다. `desktop/native/macos.swift`, UI와 공통 `lib/layouts.js`가 포함되는지 확인하세요. 로그, 테스트, `.npmrc`, 캐시, `node_modules`는 포함하지 않습니다. npm 패키지 설치 자체는 데스크톱 설정을 바꾸지 않으며 `postinstall`은 사용하지 않습니다.
|
|
@@ -37,8 +37,8 @@ TIDY_TEST_UBUNTU_DOCK=1 /usr/bin/python3 scripts/test-shell.py
|
|
|
37
37
|
```bash
|
|
38
38
|
npm login --registry=https://registry.npmjs.org/
|
|
39
39
|
npm whoami --registry=https://registry.npmjs.org/
|
|
40
|
-
npm publish ./dist/hnode-tidy-0.20.
|
|
41
|
-
npm view @hnode/tidy@0.20.
|
|
40
|
+
npm publish ./dist/hnode-tidy-0.20.2.tgz --access public --tag latest
|
|
41
|
+
npm view @hnode/tidy@0.20.2 version os dist.integrity --json
|
|
42
42
|
npm view @hnode/tidy dist-tags --json
|
|
43
43
|
```
|
|
44
44
|
|
|
@@ -49,16 +49,16 @@ npm이 요청하는 브라우저 로그인·2FA를 완료하세요. 같은 버
|
|
|
49
49
|
Node.js 22.12 이상과 Xcode Command Line Tools가 필요합니다. 컴파일러가 없다면 `xcode-select --install`로 설치를 완료한 다음 진행하세요. 게시한 버전을 명시해 이전 `latest`나 전역 설치본과 혼동하지 않도록 합니다.
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
|
-
npx --yes @hnode/tidy@0.20.
|
|
53
|
-
npx --yes @hnode/tidy@0.20.
|
|
54
|
-
npx --yes @hnode/tidy@0.20.
|
|
55
|
-
npx --yes @hnode/tidy@0.20.
|
|
52
|
+
npx --yes @hnode/tidy@0.20.2 --version
|
|
53
|
+
npx --yes @hnode/tidy@0.20.2 doctor
|
|
54
|
+
npx --yes @hnode/tidy@0.20.2 install
|
|
55
|
+
npx --yes @hnode/tidy@0.20.2 status
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
첫 명령은 `0.20.
|
|
58
|
+
첫 명령은 `0.20.2`를 출력해야 합니다. **시스템 설정 → 개인정보 보호 및 보안 → 손쉬운 사용**에서 Tidy를 허용하세요. 메뉴 막대에서 Tidy를 종료하고 다음 명령으로 다시 실행하면 새 권한을 적용합니다.
|
|
59
59
|
|
|
60
60
|
```sh
|
|
61
|
-
npx --yes @hnode/tidy@0.20.
|
|
61
|
+
npx --yes @hnode/tidy@0.20.2 prefs
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
TextEdit나 브라우저 같은 일반 창을 선택한 뒤 확인하세요.
|
|
@@ -71,11 +71,11 @@ TextEdit나 브라우저 같은 일반 창을 선택한 뒤 확인하세요.
|
|
|
71
71
|
업데이트와 제거도 같은 공개 버전으로 확인할 수 있습니다.
|
|
72
72
|
|
|
73
73
|
```sh
|
|
74
|
-
npx --yes @hnode/tidy@0.20.
|
|
75
|
-
npx --yes @hnode/tidy@0.20.
|
|
74
|
+
npx --yes @hnode/tidy@0.20.2 update
|
|
75
|
+
npx --yes @hnode/tidy@0.20.2 uninstall
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
제거 후 앱과 로그인 자동 실행 등록이 없어지고 설정은 보관돼야 합니다. macOS 기본 타일링과 시스템 단축키는 변경하지 않습니다. 실패 시 `sw_vers`, `uname -m`, `node --version`과 `npx --yes @hnode/tidy@0.20.
|
|
78
|
+
제거 후 앱과 로그인 자동 실행 등록이 없어지고 설정은 보관돼야 합니다. macOS 기본 타일링과 시스템 단축키는 변경하지 않습니다. 실패 시 `sw_vers`, `uname -m`, `node --version`과 `npx --yes @hnode/tidy@0.20.2 status` 결과를 기록하세요. 설치 실패 시 터미널에 출력된 오류도 함께 확인합니다.
|
|
79
79
|
|
|
80
80
|
## User commands
|
|
81
81
|
|
package/lib/translations.json
CHANGED
|
@@ -72,8 +72,12 @@
|
|
|
72
72
|
"Fill remaining space · {count} slots": "남은 공간 채우기 · {count}칸",
|
|
73
73
|
"Could not restore the previous extension. Run uninstall again.": "기존 확장 복원 실패. uninstall을 다시 실행하세요.",
|
|
74
74
|
"The previous Tidy did not stop. The update was cancelled.": "기존 Tidy가 중지되지 않아 업데이트를 멈췄습니다.",
|
|
75
|
-
"
|
|
76
|
-
"
|
|
75
|
+
"[Login required] Log out and log back in to apply the update.": "[재로그인 필요] 업데이트를 적용하려면 로그아웃한 뒤 다시 로그인하세요.",
|
|
76
|
+
"Tidy will start automatically at the next login. Turning the extension off and on does not apply the new code.": "다음 로그인에서 Tidy가 자동으로 활성화됩니다. 확장을 껐다 켜는 것만으로는 새 코드가 적용되지 않습니다.",
|
|
77
|
+
"[Update notice] GNOME extension code updates require logging out and back in.": "[업데이트 안내] GNOME 확장 코드를 업데이트한 뒤에는 로그아웃 후 다시 로그인해야 적용됩니다.",
|
|
78
|
+
"This extension code version is already loaded, so no logout is needed this time.": "이번에는 이미 사용 중인 확장 코드 버전이므로 재로그인 없이 바로 사용할 수 있습니다.",
|
|
79
|
+
"Moved Tidy to {uuid}. Your settings and custom shortcuts have been kept.": "Tidy 확장 식별자를 {uuid}로 변경했습니다. 기존 설정과 사용자 지정 단축키는 유지됩니다.",
|
|
80
|
+
"GNOME could not remove the previous Tidy extension.": "GNOME에서 이전 Tidy 확장을 제거하지 못했습니다.",
|
|
77
81
|
"The previous Tidy has been stopped for this session.": "현재 세션에서는 이전 Tidy를 중지해 잘못 표시되는 패널을 제거했습니다.",
|
|
78
82
|
"Install Tidy, then log out and log back in.": "Tidy를 설치한 다음 로그아웃하고 다시 로그인하세요.",
|
|
79
83
|
"New Tidy code is installed. Please log out and log back in to apply it automatically.": "새 Tidy 코드가 설치됐습니다. 한 번 로그아웃하고 다시 로그인하면 자동 적용됩니다.",
|
package/metadata.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"uuid": "
|
|
2
|
+
"uuid": "tidy@hnode",
|
|
3
3
|
"name": "Tidy",
|
|
4
4
|
"description": "Top layout picker, optional snap assist, and customizable window tiling shortcuts",
|
|
5
5
|
"shell-version": [
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
"50"
|
|
11
11
|
],
|
|
12
12
|
"settings-schema": "org.gnome.shell.extensions.winubun",
|
|
13
|
-
"version":
|
|
13
|
+
"version": 24,
|
|
14
14
|
"url": "https://github.com/hojin-v/Tidy"
|
|
15
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hnode/tidy",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"description": "Window tiling for GNOME and macOS with a layout picker, custom shortcuts and multi-monitor support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"scripts/manage.py",
|
|
23
23
|
"scripts/i18n.py",
|
|
24
24
|
"scripts/recover.js",
|
|
25
|
-
"dist/
|
|
25
|
+
"dist/tidy@hnode.shell-extension.zip",
|
|
26
26
|
"docs/README.en.md",
|
|
27
27
|
"docs/DEVELOPMENT.md",
|
|
28
28
|
"docs/MACOS.md",
|
package/scripts/manage.py
CHANGED
|
@@ -14,7 +14,8 @@ sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
|
14
14
|
from i18n import _
|
|
15
15
|
|
|
16
16
|
ROOT = Path(__file__).resolve().parent.parent
|
|
17
|
-
UUID = '
|
|
17
|
+
UUID = 'tidy@hnode'
|
|
18
|
+
LEGACY_UUIDS = ('winubun@winubun.local', 'tidy@hnode.dev')
|
|
18
19
|
DATA = Path(os.environ.get('XDG_DATA_HOME', Path.home() / '.local/share'))
|
|
19
20
|
STATE = Path(os.environ.get('XDG_STATE_HOME', Path.home() / '.local/state')) / 'winubun'
|
|
20
21
|
DEST = DATA / 'gnome-shell/extensions' / UUID
|
|
@@ -109,6 +110,55 @@ def finish_update():
|
|
|
109
110
|
AUTOSTART.unlink(missing_ok=True)
|
|
110
111
|
|
|
111
112
|
|
|
113
|
+
def print_update_notice(requires_login, stream=None):
|
|
114
|
+
stream = stream or sys.stdout
|
|
115
|
+
print(file=stream)
|
|
116
|
+
if requires_login:
|
|
117
|
+
print(_('[Login required] Log out and log back in to apply the update.'), file=stream)
|
|
118
|
+
print(_('Tidy will start automatically at the next login. Turning the extension off and on does not apply the new code.'), file=stream)
|
|
119
|
+
else:
|
|
120
|
+
print(_('[Update notice] GNOME extension code updates require logging out and back in.'), file=stream)
|
|
121
|
+
print(_('This extension code version is already loaded, so no logout is needed this time.'), file=stream)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def recover_settings(directory):
|
|
125
|
+
schema_dir = directory / 'schemas'
|
|
126
|
+
if schema_dir.exists():
|
|
127
|
+
env = dict(os.environ, GSETTINGS_SCHEMA_DIR=str(schema_dir))
|
|
128
|
+
subprocess.run(['gjs', '-m', str(directory / 'scripts/recover.js')], env=env, check=True)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def migrate_legacy():
|
|
132
|
+
installations = []
|
|
133
|
+
for uuid in LEGACY_UUIDS:
|
|
134
|
+
legacy = DATA / 'gnome-shell/extensions' / uuid
|
|
135
|
+
if legacy.is_symlink():
|
|
136
|
+
raise RuntimeError(_('Manage symlink installations manually: {path}', path=legacy))
|
|
137
|
+
registered = extension_info(uuid)
|
|
138
|
+
if not registered and not legacy.exists():
|
|
139
|
+
continue
|
|
140
|
+
if registered:
|
|
141
|
+
set_enabled(uuid, False)
|
|
142
|
+
wait_for_extension(uuid, False)
|
|
143
|
+
installations.append((uuid, legacy, registered))
|
|
144
|
+
if not installations:
|
|
145
|
+
return False
|
|
146
|
+
# Keep the original schema and state directory so custom shortcuts and the
|
|
147
|
+
# settings recovery journal survive the UUID change. Stop all old copies
|
|
148
|
+
# before recovering shared settings or restoring another tiler.
|
|
149
|
+
for _uuid, legacy, _registered in installations:
|
|
150
|
+
recover_settings(legacy)
|
|
151
|
+
restore_competitors()
|
|
152
|
+
for uuid, legacy, registered in installations:
|
|
153
|
+
if registered and registered.get('type') != 1:
|
|
154
|
+
if not shell_call('UninstallExtension', '(s)', (uuid,))[0]:
|
|
155
|
+
raise RuntimeError(_('GNOME could not remove the previous Tidy extension.'))
|
|
156
|
+
if legacy.exists():
|
|
157
|
+
shutil.rmtree(legacy)
|
|
158
|
+
print(_('Moved Tidy to {uuid}. Your settings and custom shortcuts have been kept.', uuid=UUID))
|
|
159
|
+
return True
|
|
160
|
+
|
|
161
|
+
|
|
112
162
|
def run(*args, check=True):
|
|
113
163
|
return subprocess.run(args, check=check, text=True, capture_output=True,
|
|
114
164
|
env=dict(os.environ, LC_ALL='C'))
|
|
@@ -181,6 +231,10 @@ def install(archive=None):
|
|
|
181
231
|
raise RuntimeError(_('The bundled extension does not match this installer. Download Tidy again.'))
|
|
182
232
|
if DEST.is_symlink():
|
|
183
233
|
raise RuntimeError(_('Manage symlink installations manually: {path}', path=DEST))
|
|
234
|
+
for uuid in LEGACY_UUIDS:
|
|
235
|
+
legacy = DATA / 'gnome-shell/extensions' / uuid
|
|
236
|
+
if legacy.is_symlink():
|
|
237
|
+
raise RuntimeError(_('Manage symlink installations manually: {path}', path=legacy))
|
|
184
238
|
# The session may need to discover a first installation at the next login.
|
|
185
239
|
# Keep the original tiler active until Tidy is actually available.
|
|
186
240
|
registered = extension_info()
|
|
@@ -197,14 +251,16 @@ def install(archive=None):
|
|
|
197
251
|
package.extractall(DEST)
|
|
198
252
|
if 'schemas/gschemas.compiled' not in package.namelist():
|
|
199
253
|
run('glib-compile-schemas', '--strict', str(DEST / 'schemas'))
|
|
254
|
+
migrated = migrate_legacy()
|
|
200
255
|
install_launcher()
|
|
201
256
|
if not registered or registered.get('version') != metadata['version']:
|
|
202
257
|
schedule_update(metadata['version'])
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
258
|
+
if registered or migrated:
|
|
259
|
+
print(_('The previous Tidy has been stopped for this session.'))
|
|
260
|
+
print_update_notice(True)
|
|
206
261
|
return
|
|
207
262
|
activate()
|
|
263
|
+
print_update_notice(False)
|
|
208
264
|
|
|
209
265
|
|
|
210
266
|
def activate():
|
|
@@ -252,6 +308,16 @@ def apply_update():
|
|
|
252
308
|
raise RuntimeError(_('GNOME has not registered Tidy yet. Launch Tidy from the app list.'))
|
|
253
309
|
|
|
254
310
|
|
|
311
|
+
def status():
|
|
312
|
+
info = extension_info()
|
|
313
|
+
print(json.dumps(info, ensure_ascii=False, indent=2) if info else _('The extension is not registered in the current session.'))
|
|
314
|
+
if (STATE / 'pending-update.json').exists():
|
|
315
|
+
expected = json.loads((DEST / 'metadata.json').read_text())['version']
|
|
316
|
+
if info.get('version') != expected:
|
|
317
|
+
# Keep stdout machine-readable when GNOME returned a JSON status.
|
|
318
|
+
print_update_notice(True, sys.stderr)
|
|
319
|
+
|
|
320
|
+
|
|
255
321
|
def uninstall():
|
|
256
322
|
if DEST.is_symlink():
|
|
257
323
|
raise RuntimeError(_('Remove symlink installations manually: {path}', path=DEST))
|
|
@@ -262,10 +328,7 @@ def uninstall():
|
|
|
262
328
|
elif DEST.exists():
|
|
263
329
|
print(_('The extension is not registered in this session. Checking settings recovery.'))
|
|
264
330
|
# Also recover settings if a Shell crash prevented disable() from running.
|
|
265
|
-
|
|
266
|
-
if schema_dir.exists():
|
|
267
|
-
env = dict(os.environ, GSETTINGS_SCHEMA_DIR=str(schema_dir))
|
|
268
|
-
subprocess.run(['gjs', '-m', str(DEST / 'scripts/recover.js')], env=env, check=True)
|
|
331
|
+
recover_settings(DEST)
|
|
269
332
|
restore_competitors()
|
|
270
333
|
finish_update()
|
|
271
334
|
if registered:
|
|
@@ -293,9 +356,6 @@ def main():
|
|
|
293
356
|
open_preferences()
|
|
294
357
|
elif args.command == 'prefs':
|
|
295
358
|
open_preferences()
|
|
296
|
-
elif args.command == 'status':
|
|
297
|
-
info = extension_info()
|
|
298
|
-
print(json.dumps(info, ensure_ascii=False, indent=2) if info else _('The extension is not registered in the current session.'))
|
|
299
359
|
else:
|
|
300
360
|
globals()[args.command]()
|
|
301
361
|
|