feat(quickshell): give the shell the polkit agent and one shared scrim
Moves PolkitPrompt from shell.qml into HyprChromeShell. Whether a prompt is open is shell state by the same rule as the screen and the layer pair: two surfaces read it. The prompt no longer carries a backdrop of its own. There is one ChromeBackdrop per output and a prompt raises them all, so a prompt over an already-expanded rail reuses the scrim that is there rather than stacking a second one on it, and a prompt over a collapsed rail expands that same scrim from its bar-height band to the whole output. The layer pair now keys off `scrimUp` (expanded OR prompting) rather than off the density, which keeps bar and backdrop exactly one level apart in every state. A prompt over a collapsed rail raises both: BACKGROUND sits under ordinary windows so a scrim there dims nothing, and the bar has to stay one above the scrim or the shell dims its own chrome. The rail is raised but stays collapsed — its layer answers to the scrim, its height to `expanded`. Outputs the rail does not live on get a scrim only while a prompt is up; a modal that dims one monitor and leaves the others lit does not read as modal. Expanding the rail still dims only the rail's screen, which is the existing behaviour and the right one. The dialog follows Hyprland.focusedMonitor rather than the rail's screen — a password prompt belongs where the user is looking — matched by name against Quickshell.screens, falling back to the rail's screen rather than to nothing. SUPER A is frozen while a prompt is open, and dropped rather than queued, so the rail does not spring open the moment the dialog goes. Verified on two monitors via hyprctl layers, both densities, plus the toggle block with an odd number of presses (two cancel out and prove nothing). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GAq2kKCLazZmrKvkd3akud
This commit is contained in:
@@ -15,7 +15,6 @@ import qs.HyprChrome.Widgets
|
||||
import qs.HyprChrome.Widgets.Bar.Debug
|
||||
import qs.HyprChrome.Widgets.Bar.Host
|
||||
import qs.HyprChrome.Widgets.Bar.Vitals
|
||||
import qs.HyprChrome.Widgets.Polkit
|
||||
|
||||
Scope {
|
||||
// Dense multi-monitor status rail; visual core is headlessly renderable.
|
||||
@@ -36,10 +35,6 @@ Scope {
|
||||
|
||||
Notifications {}
|
||||
|
||||
// Polkit authentication agent. Registers for this logind session on
|
||||
// creation, so it replaces hyprpolkitagent rather than coexisting with it
|
||||
// — only one agent may hold a session (see hosts/terra/home/hyprland.nix).
|
||||
PolkitPrompt {}
|
||||
VolumeOsd {}
|
||||
|
||||
// Host vitals HUD — toggle with SUPER CTRL V.
|
||||
|
||||
Reference in New Issue
Block a user