Skip to content

Commit 8fd71b8

Browse files
committed
docs: add overview dynamic zoom documentation
Document the new overview zoom controls: - zoom-presets, min-zoom, max-zoom, zoom-step config options - overview-zoom-cycle, overview-zoom-in, overview-zoom-out, overview-set-zoom actions This code has been created with LLM assistance
1 parent a387e2c commit 8fd71b8

File tree

3 files changed

+105
-0
lines changed

3 files changed

+105
-0
lines changed

docs/wiki/Configuration:-Key-Bindings.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,3 +405,34 @@ binds {
405405
Super+Alt+L allow-inhibiting=false { spawn "swaylock"; }
406406
}
407407
```
408+
409+
#### `overview-zoom-cycle`, `overview-zoom-in`, `overview-zoom-out`, `overview-set-zoom`
410+
411+
Actions for dynamically adjusting the zoom level while in the [Overview](./Overview.md).
412+
These actions have no effect when the overview is closed.
413+
414+
- `overview-zoom-cycle`: Cycle through the zoom levels defined in [`zoom-presets`](./Configuration:-Miscellaneous.md#zoom-presets). Does nothing if no presets are configured.
415+
- `overview-zoom-in`: Increase the zoom level (show workspaces larger) by `zoom-step`.
416+
- `overview-zoom-out`: Decrease the zoom level (show workspaces smaller) by `zoom-step`.
417+
- `overview-set-zoom`: Set a specific zoom level.
418+
419+
Zoom changes apply instantly and reset to the config default when the overview closes.
420+
421+
```kdl
422+
binds {
423+
// Cycle through preset zoom levels
424+
Mod+Z { overview-zoom-cycle; }
425+
426+
// Scroll to adjust zoom (Ctrl+Wheel, since Shift+Wheel scrolls horizontally)
427+
Ctrl+WheelScrollUp cooldown-ms=150 { overview-zoom-in; }
428+
Ctrl+WheelScrollDown cooldown-ms=150 { overview-zoom-out; }
429+
430+
// Custom step size
431+
Mod+Plus { overview-zoom-in step=0.05; }
432+
Mod+Minus { overview-zoom-out step=0.05; }
433+
434+
// Set a specific zoom level
435+
Mod+1 { overview-set-zoom level=0.5; }
436+
Mod+2 { overview-set-zoom level=0.25; }
437+
}
438+
```

docs/wiki/Configuration:-Miscellaneous.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,50 @@ overview {
240240
}
241241
```
242242

243+
#### `zoom-presets`
244+
245+
Define a list of zoom levels to cycle through using the `overview-zoom-cycle` action.
246+
If not set or empty, the cycle action does nothing.
247+
248+
```kdl
249+
overview {
250+
zoom-presets 0.5 0.25 0.1
251+
}
252+
```
253+
254+
#### `min-zoom`
255+
256+
Minimum zoom level for `overview-zoom-out`.
257+
Defaults to `0.05`.
258+
259+
```kdl
260+
overview {
261+
min-zoom 0.05
262+
}
263+
```
264+
265+
#### `max-zoom`
266+
267+
Maximum zoom level for `overview-zoom-in`.
268+
Defaults to `0.75`.
269+
270+
```kdl
271+
overview {
272+
max-zoom 0.75
273+
}
274+
```
275+
276+
#### `zoom-step`
277+
278+
Amount to adjust zoom by when using `overview-zoom-in` or `overview-zoom-out`.
279+
Defaults to `0.1`.
280+
281+
```kdl
282+
overview {
283+
zoom-step 0.1
284+
}
285+
```
286+
243287
### `xwayland-satellite`
244288

245289
<sup>Since: 25.08</sup>

docs/wiki/Overview.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,36 @@ overview {
5454
}
5555
```
5656

57+
### Dynamic Zoom
58+
59+
You can dynamically adjust the zoom level while in the overview using key bindings or scroll actions.
60+
This lets you zoom in to focus on specific workspaces, or zoom out to get a broader view.
61+
62+
Zoom changes apply instantly and reset to the config default when the overview closes.
63+
64+
```kdl
65+
overview {
66+
zoom 0.5
67+
68+
// Optional: preset levels for cycling
69+
zoom-presets 0.5 0.25 0.1
70+
71+
// Optional: bounds for scroll-based zoom
72+
min-zoom 0.05
73+
max-zoom 0.75
74+
zoom-step 0.1
75+
}
76+
77+
binds {
78+
// Cycle through zoom presets
79+
Mod+Z { overview-zoom-cycle; }
80+
81+
// Scroll to adjust zoom (use Ctrl since Shift is reserved for horizontal scroll)
82+
Ctrl+WheelScrollUp cooldown-ms=150 { overview-zoom-in; }
83+
Ctrl+WheelScrollDown cooldown-ms=150 { overview-zoom-out; }
84+
}
85+
```
86+
5787
To change the color behind the workspaces, use the `backdrop-color` setting:
5888

5989
```kdl

0 commit comments

Comments
 (0)