This is a standalone, client-side visual editor for Magnetile, KZones, and PlasmaZones layout JSON.
It edits the shared KWin script layout schema:
- Top-level value: an array of layouts
- Layout fields:
name,padding, andzones - Zone fields:
x,y,width, andheightas screen percentages - Optional zone fields are preserved where possible, including
applications,indicator, andcolor
The default export target is Magnetile. The KZones / PlasmaZones export target emits the documented KZones-compatible layout array and keeps common optional KZones fields. PlasmaZones uses that same format.
Use the generated JSON in:
System Settings / Window Management / KWin Scripts / Magnetile / LayoutsSystem Settings / Window Management / KWin Scripts / KZones / Layouts- PlasmaZones' KZones layout import flow
After saving settings, disable and enable the KWin script if the new layout does not appear immediately.
The app uses vanilla HTML, CSS, and JavaScript modules. No build step is required.
Run a local static server from the repository root:
python3 -m http.server 8000Then open:
http://localhost:8000/web-editor/
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.
GitHub Pages deployment is handled by .github/workflows/deploy-editor.yml.
The workflow uploads the web-editor/ directory and deploys it with the modern GitHub Pages Actions flow:
actions/configure-pages@v5actions/upload-pages-artifact@v3actions/deploy-pages@v4
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.
Useful checks before opening a pull request:
- Create a two-zone layout by dragging on the canvas.
- Export both Magnetile and KZones JSON.
- Import a previously exported file.
- Copy JSON to the clipboard.
- Load each bundled preset.
- Test the page in Chromium, Firefox, and Safari/WebKit where available.