47 lines
3.0 KiB
Markdown
47 lines
3.0 KiB
Markdown
# Continuum Scratchpad and Window Actions Design
|
|
|
|
## Purpose
|
|
|
|
Complete Continuum as a practical GNOME-like window overview: windows can be moved directly between workspaces, closed without first focusing them, and set aside in one global scratchpad shelf.
|
|
|
|
## Experience
|
|
|
|
- Every window thumbnail is clickable, draggable, and gains a quiet close button on hover or keyboard focus.
|
|
- Dropping a thumbnail on a workspace card moves it there without leaving the overview.
|
|
- A global scratchpad shelf sits along the bottom of Continuum. Empty, it is a subtle drop target. Populated, it expands into a horizontal row of live cards.
|
|
- Dropping a normal window on the shelf sends it to `special:scratch`. Clicking a shelf card restores it to the selected positive workspace, focuses it, and closes Continuum.
|
|
- `Super+X` continues to toggle the global scratchpad and `Super+Shift+X` continues to send the active window there.
|
|
- Closing a thumbnail asks Hyprland to close exactly that address and leaves the overview open.
|
|
- Drag operations have restrained scale/highlight feedback, never continuous decorative animation.
|
|
|
|
## Architecture
|
|
|
|
`WindowThumbnail.qml` owns pointer drag initiation, hover chrome, and close intent. It emits `activated`, `closeRequested`, and `dragStarted/dragFinished` signals with its toplevel; it does not dispatch compositor commands.
|
|
|
|
`WorkspaceCard.qml` becomes a drop destination and forwards window actions to `OverviewBody.qml`. `OverviewBody.qml` is the sole compositor-command boundary for focus, close, workspace moves, and scratchpad moves, keeping address normalization in one place.
|
|
|
|
`ScratchpadShelf.qml` renders the special workspace model and provides the global drop target. `ScratchpadCard.qml` reuses the same thumbnail presentation at a compact size.
|
|
|
|
The shelf reads the Hyprland workspace whose name is `special:scratch`. Positive workspaces remain the only entries in the filmstrip and search model.
|
|
|
|
## Keyboard and Input
|
|
|
|
- Left/Right selects workspaces when search is empty.
|
|
- Enter opens the selected workspace or focused search result.
|
|
- Delete closes the keyboard-selected window.
|
|
- Escape closes Continuum.
|
|
- Pointer dragging never activates a window on release after a successful drag.
|
|
|
|
## Failure Handling
|
|
|
|
- Missing or stale addresses make the command a no-op and trigger a workspace/toplevel refresh.
|
|
- If the scratch workspace does not yet exist, the first drop creates it through Hyprland's normal special-workspace move dispatcher.
|
|
- Closing or moving a window invalidates captures; Continuum refreshes models and recaptures after the compositor reports the change.
|
|
|
|
## Verification
|
|
|
|
- Static contracts confirm all dispatches are address-scoped and the shelf only targets `special:scratch`.
|
|
- Live tests create disposable windows, move them across workspaces and into/out of the scratchpad, close only the intended disposable window, and restore the user's prior workspace.
|
|
- Visual captures cover the empty shelf, populated shelf, workspace drop target, and hover close control.
|
|
- Existing focus and overview-search tests remain green.
|