You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a standalone, client-side visual editor for Magnetile and KZones layout JSON.
4
+
5
+
It edits the shared KWin script layout schema:
6
+
7
+
- Top-level value: an array of layouts
8
+
- Layout fields: `name`, `padding`, and `zones`
9
+
- Zone fields: `x`, `y`, `width`, and `height` as screen percentages
10
+
- Optional zone fields are preserved where possible, including `applications`, `indicator`, and `color`
11
+
12
+
## Compatibility
13
+
14
+
The default export target is Magnetile. The KZones export target emits the same documented KZones-compatible layout array and keeps common optional KZones fields.
After saving settings, disable and enable the KWin script if the new layout does not appear immediately.
22
+
23
+
## Local Development
24
+
25
+
The app uses vanilla HTML, CSS, and JavaScript modules. No build step is required.
26
+
27
+
Run a local static server from the repository root:
28
+
29
+
```sh
30
+
python3 -m http.server 8000
31
+
```
32
+
33
+
Then open:
34
+
35
+
```text
36
+
http://localhost:8000/web-editor/
37
+
```
38
+
39
+
Opening `index.html` directly can work for most editor behavior, but the example layout JSON is loaded with `fetch`, so a local server is the closest match to GitHub Pages.
40
+
41
+
## Deployment
42
+
43
+
GitHub Pages deployment is handled by `.github/workflows/deploy-editor.yml`.
44
+
45
+
The workflow uploads the `web-editor/` directory and deploys it with the modern GitHub Pages Actions flow:
46
+
47
+
-`actions/configure-pages@v5`
48
+
-`actions/upload-pages-artifact@v3`
49
+
-`actions/deploy-pages@v4`
50
+
51
+
## Contributing
52
+
53
+
Keep the editor fully client-side and dependency-free unless a dependency removes significant complexity. Preserve existing imported layout metadata when editing zones, because users may carry optional Magnetile or KZones settings in their JSON.
54
+
55
+
Useful checks before opening a pull request:
56
+
57
+
- Create a two-zone layout by dragging on the canvas.
58
+
- Export both Magnetile and KZones JSON.
59
+
- Import a previously exported file.
60
+
- Copy JSON to the clipboard.
61
+
- Load each bundled preset.
62
+
- Test the page in Chromium, Firefox, and Safari/WebKit where available.
0 commit comments