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
You are an AI developer assisting with the Workflow Tiling GNOME Shell extension.
5
+
6
+
## General Mandates
7
+
8
+
### 1. Testing Mandate
9
+
**ALWAYS** run unit tests before proposing a change.
10
+
**ALWAYS** write unit tests for new features. A task is not considered "ready for testing" until unit tests are written and pass.
11
+
```bash
12
+
npm test
13
+
```
14
+
15
+
### 2. Commentary & Documentation Rules
16
+
Documentation focuses on the current state and behavior of the system.
17
+
Avoid numbered lists for documentation or commentary.
18
+
Exclude explanations of why alternative approaches were rejected.
19
+
Do not use temporal language such as "new", "now", or "replaced".
20
+
Refrain from "diary comments" that describe the history or process of changes.
21
+
22
+
**CRITICAL DOCS MANDATE**: Always keep documentation files (`architecture.md`, `layouts.md`, `README.md`, etc.) up-to-date when altering code functionality. If you change a class name, execution flow, or API, immediately update the relevant docs.
23
+
24
+
### 3. Logging Suggestion
25
+
It is highly suggested to use debuggable logging (`Logger` in `lib/logger.js`). When debugging complex flows, include verbose logs for state sequences to aid troubleshooting.
26
+
27
+
### 4. Settings UI Design
28
+
Follow a **"minimal clutter, expand only after needed"** design philosophy for `prefs.js`.
29
+
Examples from the current codebase:
30
+
- "Inner Gaps" and "Outer Gaps" spinrows only appear when "Enable Gaps" is toggled on.
31
+
- Custom shortcuts rows only appear when "Mode" is set to "Custom".
32
+
- The Advanced JSON Editor page only mounts when explicitly toggled.
33
+
Always use `Adw` (libadwaita) components. Bind visibility state dynamically to reduce visual noise for the average user.
34
+
35
+
### 5. Gnome API Guidelines
36
+
Always use the newest solutions and APIs for GNOME Shell.
37
+
38
+
### 6. Event-Driven Architecture
39
+
Avoid arbitrary timeouts. Rely on GNOME Shell signals (`size-changed`, `window-created`, etc.) or frame-synced deferrals (`GLib.idle_add`, `Meta.LaterType.BEFORE_REDRAW`) instead of `GLib.timeout_add`.
40
+
41
+
## Cross References
42
+
-**Architecture**: See `architecture.md` for discrete responsibilities and execution flow. **Note**: We rely on *insertion-order based slots* (historical tracking) rather than purely arbitrary visual spatial arrangements. `StateTracker` matches windows to slots via their internal IDs (`get_id()`).
43
+
-**Layout JSONs**: See `layouts.md` for guidelines on how the Escalator layouts and transitions are formatted in JSON.
44
+
-**Vision**: See `vision.md` for core philosophy and scaling design.
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,13 @@ A deterministic customizable auto-tiler extension for GNOME Shell (GNOME 50+).
8
8
-**Workspace Isolation**: Tiling states are unique to each GNOME workspace.
9
9
-**Stability Focused**: Uses WindowWrapper object modeling and compositor-native synchronization (Meta.LaterType) to prevent race conditions and Shell crashes.
10
10
11
+
## Recommended Extensions
12
+
Workflow Tiling does not natively draw an active window border. For visual indication of the focused window, it is highly recommended to use an extension like **P7 Border**
13
+
11
14
## Custom Layouts
12
15
Layout transitions are configured via JSON string, supporting custom window counts and sizes.
13
16
14
-
Optional `id`integer properties (1-indexed) in the JSON structure define how windows transition between states:
17
+
Optional `id` (1-indexed) integer properties in the JSON structure define how windows transition between states. It is required for all elements:
15
18
16
19
```json
17
20
{
@@ -36,12 +39,11 @@ Optional `id` integer properties (1-indexed) in the JSON structure define how wi
36
39
Unit tests are written using **Vitest**.
37
40
```bash
38
41
npm install
39
-
npmtest
42
+
maketest
40
43
```
41
44
42
45
### Installation
43
-
To link the extension to your local GNOME Shell directory:
46
+
To deploy the extension to your local GNOME Shell directory:
Workflow Tiling uses an "Escalator" system (`lib/layout.js`) to generate window estates dynamically.
4
+
Custom layout transitions are defined via a JSON object.
5
+
6
+
## Structure
7
+
The JSON keys represent the total number of windows on a monitor. The values are arrays of window geometry definitions for that count.
8
+
9
+
```json
10
+
{
11
+
"1": [
12
+
{"x": 0, "y": 0, "w": 100, "h": 100, "id": 1}
13
+
],
14
+
"2": [
15
+
{"x": 0, "y": 0, "w": 50, "h": 100, "id": 1},
16
+
{"x": 50, "y": 0, "w": 50, "h": 100, "id": 2}
17
+
]
18
+
}
19
+
```
20
+
21
+
## Properties
22
+
-`x`: X percentage offset (0 to 100)
23
+
-`y`: Y percentage offset (0 to 100)
24
+
-`w`: Width percentage (0 to 100)
25
+
-`h`: Height percentage (0 to 100)
26
+
-`id` (Required): The logical 1-indexed ID this window occupies. The IDs map to the insertion order of windows. E.g., `id: 1` is the oldest window, `id: 2` is the second oldest. It MUST be unique and cover 1 to the window count.
27
+
28
+
## Fallback
29
+
If the window count exceeds the highest key defined in the JSON, extra windows will fall back to floating mode (unmanaged by the auto-tiler).
0 commit comments