Files
glassMxrph/docs/phase-4.md
T
mxandClaude Opus 5.5 99e64a7713 Add glassMxrph shell sources
Initial commit of the Quickshell desktop suite: bar, dock, launcher,
settings, Control Center, dashboard, OSD, lock screen, desktop widgets,
plugin host with the vendored Noctalia/Omarchy compatibility layer,
helpers, packaging, tests and phase documentation.

Includes the optimization work so far: usage widgets and dashboard
gauges no longer animate continuously, desktop widgets pause while
covered, system controls stop flickering on background polls, dock app
matching uses an indexed catalog, and workspace ghosts are created only
for occupied slots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:36:17 +02:00

167 lines
8.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Phase 4 — launcher and command palette
Implemented and tested from source on the existing Quickshell 0.3.1 runtime,
Qt 6 and Hyprland 0.56.2. All changes are inside this project. Nix files,
Hyprland configuration, installed packages and existing keybinds are unchanged.
## Try it
Start the shell from its project root:
```sh
./scripts/glassmxrph run
```
In another terminal, toggle the running launcher's IPC endpoint:
```sh
./scripts/glassmxrph launcher
```
Or use the endpoint directly:
```sh
quickshell ipc --path ./quickshell call launcher toggle
quickshell ipc --path ./quickshell call launcher open
quickshell ipc --path ./quickshell call launcher close
quickshell ipc --path ./quickshell call launcher status
```
The launcher is centered within the active monitor. Search names, desktop IDs,
generic names, keywords or descriptions. Exact/prefix matches rank above substring
and fuzzy matches; accents and case are normalized. Multiple words must all match.
Only launchable entries appear; NoDisplay entries are excluded. Hover highlights do not override keyboard selection. Results are a
scrollable icon list, backed by the same application service as the dock.
Up/Down (or Tab/Shift+Tab) select; Enter launches; Escape closes. Left/Right remain
text cursor keys, with Ctrl+Left/Right also navigating results. Clicking a result
launches it; clicking outside dismisses the surface. Search resets when reopened.
Terminal applications use the existing configured terminal argument array; a missing
terminal configuration leaves the launcher open with a visible explanation.
Search text is never executed as a shell command.
Opening expands a centered search pill horizontally, then grows the results area.
Closing reverses the dimensions. Theme motion duration and reduced motion apply.
Settings → Launcher controls width, result limit and descriptions. Settings is also
reachable from `>launcher`. Recent files remain optional future work: this phase
neither indexes nor displays a user's recent documents.
## Commands and Settings
Type `>` to list commands; fuzzy prefixes such as `>wall` are supported.
| Command | Settings destination | Current status |
| --- | --- | --- |
| `>appearance` | Appearance | Existing accent/glass/motion controls |
| `>wallpaper` | Wallpaper | Labelled future page; Phase 5 picker |
| `>bar` | Bar | Tray controls; full bar editor in Phase 5 |
| `>tray` | Bar / Tray | Existing tray controls |
| `>dock` | Dock | Complete Phase 3 controls |
| `>media` | Media | Labelled future page; media work in Phases 5–6 |
| `>controlcenter` | Control Center | Labelled future page; Phase 7 |
| `>launcher` | Launcher | Search preferences |
| `>display` | Displays | Labelled future page |
| `>audio` | Audio | Labelled future page |
| `>network` | Network | Labelled future page |
| `>bluetooth` | Bluetooth | Labelled future page |
| `>notifications` | Notifications | Labelled future page |
| `>power` | Power | Labelled future page; no power action executes |
| `>about` | About | Project information |
Every destination is available through the Settings page selector. Later-phase
pages explicitly say their controls are not implemented. Commands do not fabricate
system state or launch substitute external control applications.
`SettingsRegistry` supplies the shared route metadata. `CommandRegistry` can accept
trusted QML extensions with a unique ID, title, description and `run` function via
`registerCommand()`, and remove them with `unregisterCommand()`. Preferences and
search input cannot inject QML or executable command text.
## Keybinds — documented, not installed
Review your existing Super+D and Super+Space bindings first. When ready to integrate,
replace `/absolute/path/to/glassMxrph` below with the clone's real absolute path and
add these through your existing Hyprland/ZaneyOS workflow:
```ini
bind = SUPER, D, exec, quickshell ipc --path /absolute/path/to/glassMxrph/quickshell call launcher toggle
bind = SUPER, SPACE, exec, quickshell ipc --path /absolute/path/to/glassMxrph/quickshell call launcher toggle
```
Quote a path containing spaces. These commands only contact the running shell;
they do not start another Quickshell instance. The source runner remains the launch
entry point until Nix/autostart integration is handled later. No existing bind was
removed or replaced in this phase. Super+X belongs to the later Control Center phase.
## Files
New:
- `quickshell/launcher/Launcher.qml`, `LauncherState.qml`, `AppSearch.qml`,
`CommandSearch.qml`, `CommandRegistry.qml`, `SearchLogic.js`, `qmldir`
- `quickshell/core/SettingsRegistry.qml`
- `quickshell/settings/pages/Launcher.qml`
- `quickshell/testing/LauncherDriver.qml` (opt-in QtTest input)
- `tests/launcher.test.cjs`, `tests/launcher_runtime.py`
- `docs/phase-4.md`
Updated:
- `quickshell/shell.qml`: composition, optional driver and routing diagnostics.
- `quickshell/core/ShellState.qml`, `ScreenService.qml`, `qmldir`: active-output
state, launcher/settings exclusivity and registered settings routes.
- `quickshell/services/TrayService.qml`, `quickshell/dock/DockState.qml`: popup coordination.
- `quickshell/config/defaults.json`, `quickshell/services/ConfigLogic.js`: additive,
validated launcher defaults under schema 3; existing pins/options remain intact.
- `quickshell/settings/Settings.qml`: page selector, launcher controls and future destinations.
- `scripts/glassmxrph`, `scripts/validate`: IPC toggle and search tests.
- `tests/config.test.cjs`, `tests/dock_runtime.py`, `tests/tray_runtime.py`: preservation
and popup-coordination regressions.
- `README.md`, `dependencies.json`, `docs/architecture.md`, `docs/validation.md`.
## API and monitor handling
The installed DesktopEntry metadata provides name, genericName, comment, keywords,
noDisplay and native execution; the existing shared launch service owns execution.
No second desktop-entry parser, application daemon or background subprocess was added.
`ScreenService` eagerly tracks active output state using Quickshell's native
[Hyprland rawEvent API](https://quickshell.org/docs/v0.3.1/types/Quickshell.Hyprland/Hyprland/)
and the documented [focusedmon/focusedmonv2 events](https://wiki.hypr.land/IPC/).
This avoids stale cached focus during IPC monitor changes without a polling timer.
The output is captured when opening, so typing does not move the launcher between
monitors. Settings uses the same active-output resolver. No virtual-desktop centering.
## Validation and limits
Passed QML lint, search ranking and configuration tests, plus live launcher,
foundation, dock and private-DBus tray suites. Runtime logs contained no QML warnings
or DBus errors. The launcher was visually inspected from a rendered capture.
The launcher test verifies centering on both available outputs, real keyboard/text
and pointer input, stationary-pointer keyboard selection during animation, fuzzy/keyword matching, hidden-entry exclusion, actual execution
of temporary desktop entries, visible terminal errors, all 15 command destinations,
extension registration/removal, Escape/outside dismissal, reduced motion and rapid
toggles. Dock/tray suites verify the launcher dismisses their menus. Existing
configuration persistence, palette reload and duplicate prevention still pass.
```sh
./scripts/validate
python3 tests/launcher_runtime.py
python3 tests/dock_runtime.py
dbus-run-session -- python3 tests/tray_runtime.py
python3 tests/runtime.py
```
Use matching installed QML imports and the existing patched runtime for the tray
suite. QtTest is a development dependency only; the launcher driver loads solely
with `GLASSMXRPH_LAUNCHER_TESTING=1`. Tests refuse to run against a source path already
in use. Use a separate source copy if retaining a running preview. Run graphical
suites sequentially. The launcher test temporarily focuses each output and restores
the original output; it launches only temporary helper entries, not real apps.
Remaining manual acceptance: physical keybind routing once integrated, compositor
pointer behaviour, fractional scaling, hotplug, input methods, app-specific desktop
entry field-code limitations inherited from Quickshell, and other distributions.
Nix builds/integration remain deferred. No recent-files provider is implemented.