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>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-10-07 22:36:17 +02:00
commit 99e64a7713
433 files changed
+57792

No files matched your search

+127
View File
@@ -0,0 +1,127 @@
# Phase 7 — Control Center
## Implemented
The right-hand system pill and running-shell IPC open Control Center at the active monitor's upper-right. The glass surface expands in width and height, reverses on closing and honors reduced motion. Escape/outside click dismiss it. Launcher, Settings, dock menus and tray menus coordinate visibility; tray activation never opens Control Center.
Modules are registered separately and can be enabled, disabled and reordered in Settings → Control Center. The current modules are connectivity, audio/microphone, brightness, Night Light, Do Not Disturb, power profiles, shared MPRIS media and power actions. Detailed Audio, Network, Bluetooth, Displays, Notifications and Power settings are now reachable through the sidebar and command palette.
- PipeWire: live default output/input, volume and mute; device selection under Audio.
- NetworkManager: live Wi-Fi radio state and connections; saved/open/PSK network connection UI. PSKs pass directly to the native API, are cleared from the field and are never stored in shell preferences. NetworkManager may store credentials in its own profiles. Enterprise/hidden networks and VPN management use the existing network editor.
- BlueZ: adapter selection, radio state and paired-device connect/disconnect. Pairing and PIN confirmation use the existing Bluetooth manager rather than registering a competing pairing agent.
- Brightness: actual backlight devices via brightnessctl, with configurable status/set command adapters for other providers.
- Night Light: the running wl-gammarelay DBus Temperature property, or a configured provider. No gamma daemon is started. Existing schedules may subsequently change temperature.
- Notifications: live SwayNC DND state through non-activating DBus calls; no replacement notification daemon is registered.
- Power: supported power profiles, detected lock command, Hyprland logout and logind suspend/reboot/shutdown. Logout, reboot and shutdown first present explicit confirmation. Escape cancels a pending confirmation before closing the panel.
Unknown or unavailable capabilities produce disabled controls and explanatory text. Requests do not optimistically fabricate provider state; command adapters refresh state after success. Native services report through their live models.
## Run and test manually
```sh
./scripts/glassmxrph run
# In another terminal:
./scripts/glassmxrph controlcenter
quickshell ipc --path ./quickshell call controlcenter status
quickshell ipc --path ./quickshell call shell openSettings controlcenter
```
Try opening/closing repeatedly, Escape/outside dismissal, both monitors, module order and reduced motion. Audio device selectors live under Settings → Audio. Check unavailable brightness/Night Light providers under Displays. Power confirmation can be tested safely by choosing Reboot and then Cancel.
The optional Hyprland binding is:
```ini
bind = SUPER, X, exec, /absolute/path/to/glassMxrph/scripts/glassmxrph controlcenter
```
This is documentation only. The existing Super+X Serpantinum binding and all Nix/Hyprland configuration remain unchanged. Replace conflicting bindings only during the later integration step. The command toggles an existing instance; it never launches duplicate Quickshell processes.
## Provider configuration
Preferences are under `system` in the existing XDG configuration:
```json
{
"brightness": {"device":"auto", "statusCommand":[], "setCommand":[]},
"nightLight": {"temperature":4000, "statusCommand":[], "setCommand":[]},
"power": {"lockCommand":[]}
}
```
These are also editable in Displays and Power settings. Commands are JSON argument arrays, never shell-evaluated strings. Both status and set commands are needed for a custom display provider. Brightness status returns `{"available":true,"value":50}` (percent); Night Light status returns `{"available":true,"enabled":false}`. Set arguments support `{value}` (brightness percent or Kelvin) and `{enabled}` (Night Light boolean). Do not return optimistic state before the provider has applied a change.
An empty lock command detects installed Serpantinum (`serpantinum lock`) first, then hyprlock. A configured argument array overrides that choice. Lock dispatch indicates the command was launched; locking/authentication remain the existing locker's responsibility. Power actions use existing logind/polkit policy and do not bypass inhibitors or authorization.
The CLI adapters use structured busctl JSON for profile/capability data and `/sys/class/backlight` for device enumeration. Native NetworkManager/BlueZ/PipeWire models are event-driven. One shared asynchronous job refreshes only relevant visible command-backed controls every five seconds; polling stops when those views close. Wi-Fi scanning is enabled only while the Network page is open. No duplicate daemons are installed or started.
`controlCenter.version: 1` marks a one-time migration of the unused Phase 1–6 empty module list. Nonempty layouts and unknown metadata survive; intentional empty layouts after migration stay empty. Malformed configuration remains blocked for correction. The runner derives `TZDIR` from an existing `/etc/localtime` zoneinfo symlink when unset, avoiding Qt timezone lookup warnings without hardcoded distribution paths.
## Validation and limits
Quickshell 0.3.1 native APIs were checked against installed qmltypes/source. Actual provider discovery was read-only: PipeWire/WirePlumber, NetworkManager, BlueZ, SwayNC, power-profiles-daemon and logind are present. This desktop has no backlight device and no running gamma relay; those controls remain unavailable until appropriate existing providers are configured. No DDC utility or gamma daemon was installed. Serpantinum's installed Night Light script supplied the verified wl-gammarelay DBus interface; its script is not invoked because it can start/manage daemons.
Control Center runtime tests inspect native state, then substitute test-only recording models/adapters before any write. They exercise real Qt input for volume/microphone, Wi-Fi/Bluetooth, brightness, DND, Night Light, power confirmation/cancel, visual module reorder/toggle, both monitors, outside/Escape, reduced motion, reopen behavior and Settings routes. Provider unit tests check argv boundaries, numeric/type validation, unavailable providers, JSON errors and rejection of destructive actions without confirmation. A private-bus regression caught SwayNC client auto-activation; the final adapter uses `busctl --auto-start=no` instead, with a test that no notification daemon appears. Physical volume/radio/display changes and actual power actions were deliberately not executed; real hardware acknowledgements, credentials, pairing and polkit remain integration checks.
```sh
./scripts/validate
# Real Hyprland session; QtTest required. Use an isolated project copy if already running:
python3 tests/controlcenter_runtime.py
```
Runtime logs are checked for QML warnings, errors and DBus failures. Earlier-phase regression scripts are also run, including media fixtures and tray/Control Center exclusivity on a private session bus. Screenshots/logs stay under ignored `.cache/`; nothing is published. Nix files are hash-checked unchanged and no package/system rebuild is performed.
Advanced compositor blur/refraction remains Phase 9. Display mode editing, a native pairing agent, additional notification backends, dark-mode synchronization and native VPN controls are not included in this phase. The existing external tools remain available for advanced network and Bluetooth management.
## Changed files
- `README.md`
- `dependencies.json`
- `docs/architecture.md`
- `docs/compatibility.md`
- `docs/phase-7.md`
- `docs/validation.md`
- `quickshell/bar/modules/SystemModule.qml`
- `quickshell/config/defaults.json`
- `quickshell/controlcenter/ControlCard.qml`
- `quickshell/controlcenter/ControlCenter.qml`
- `quickshell/controlcenter/ControlRegistry.qml`
- `quickshell/controlcenter/SystemTile.qml`
- `quickshell/controlcenter/modules/Audio.qml`
- `quickshell/controlcenter/modules/Brightness.qml`
- `quickshell/controlcenter/modules/Connectivity.qml`
- `quickshell/controlcenter/modules/Dnd.qml`
- `quickshell/controlcenter/modules/NightLight.qml`
- `quickshell/controlcenter/modules/Power.qml`
- `quickshell/controlcenter/modules/Profiles.qml`
- `quickshell/controlcenter/qmldir`
- `quickshell/core/SettingsRegistry.qml`
- `quickshell/core/ShellState.qml`
- `quickshell/dock/DockState.qml`
- `quickshell/helpers/system.py`
- `quickshell/services/AudioService.qml`
- `quickshell/services/BluetoothService.qml`
- `quickshell/services/ConfigLogic.js`
- `quickshell/services/NetworkService.qml`
- `quickshell/services/PowerService.qml`
- `quickshell/services/ProviderJob.qml`
- `quickshell/services/SystemService.qml`
- `quickshell/services/TrayService.qml`
- `quickshell/services/qmldir`
- `quickshell/settings/Settings.qml`
- `quickshell/settings/controls/CommandPreference.qml`
- `quickshell/settings/pages/Audio.qml`
- `quickshell/settings/pages/Bluetooth.qml`
- `quickshell/settings/pages/ControlCenter.qml`
- `quickshell/settings/pages/Displays.qml`
- `quickshell/settings/pages/Network.qml`
- `quickshell/settings/pages/Notifications.qml`
- `quickshell/settings/pages/Power.qml`
- `quickshell/shell.qml`
- `quickshell/testing/ControlDriver.qml`
- `quickshell/testing/recording_system.py`
- `scripts/glassmxrph`
- `scripts/validate`
- `tests/config.test.cjs`
- `tests/controlcenter_runtime.py`
- `tests/system_providers_test.py`
- `tests/tray_runtime.py`