Files
homelab/dotfiles/quickshell/shell.qml
T
darmanandClaude Opus 5 05d26e386f feat(quickshell): add polkit authentication agent
Registers a polkit agent for the logind session and presents its requests in
the hyprchrome panel chrome. PolkitPrompt owns the agent, the layer-shell
surface and focus; PolkitPromptContent is the headlessly renderable visual
core, staged by tests/PolkitPromptHeadless.qml.

Replaces terra's hyprpolkitagent autostart, which had been dead for a while:
the unit was never installed, so the start failed silently and the session
ran with no polkit agent at all.

Verified against a live agent — registration, the PAM conversation, retry
after a rejected attempt, and cancellation. Behaviours found by tracing that
the component now documents:

  * registration is ASYNCHRONOUS, so a Component.onCompleted check reports a
    false failure while a change handler cannot see a total failure at all
    (a failed registration never changes the property) — hence the deadline
  * a flow arrives with isResponseRequired false and an empty prompt, so the
    field is still disabled when the window first becomes visible and the
    re-focus on that transition is load bearing
  * concurrent requests SUPERSEDE rather than queue, orphaning the older one.
    Cancelling it from QML trips "QObject::connect(AuthFlow, PolkitAgentImpl):
    invalid nullptr parameter" upstream and costs the live prompt as well, so
    it is deliberately left alone
  * Identity.id is the raw uid, not unix-user:<name>

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GAq2kKCLazZmrKvkd3akud
2026-09-01 22:35:23 +02:00

82 lines
2.6 KiB
QML
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.
//@ pragma UseQApplication
import QtQuick
import Quickshell
import Quickshell.Widgets
import qs.widgets.bar
import qs.widgets.launcher
import qs.widgets.notifications
import qs.widgets.osd
import qs.widgets.systray
import qs.widgets.theme
import qs.widgets.vitals
import qs.HyprChrome
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.
HyprChromeShell {}
// App launcher variants — 111; variant 8 remains the primary HUD.
LauncherStack {} // 1 — left vertical list
LauncherGrid {} // 2 — centered icon grid
LauncherSpotlight {} // 3 — top-center command bar
LauncherConsole {} // 4 — full-width deck unfolding from the top bar
LauncherDock {} // 5 — deck rising from the bottom bar
LauncherSlant {} // 6 — angular / sheared panel
LauncherCorner {} // 7 — Slant (V6) copy + floating power panel (shutdown/reboot)
ApplicationLauncher {} // 8 — dense HUD command index (primary)
BladeLauncher {} // 9 — asymmetric blade matrix
OrbitLauncher {} // 10 — radial targeting arena
CyberDock {} // 11 — cyberpunk bottom cartridge dock
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.
Vitals {}
// Widget staging area, centered on the secondary monitor (HDMI-A-1),
// toggled with SUPER CTRL D. Swap the children below for whatever widget
// is being worked on; they must carry their own size (see DebugWindow).
// DebugWindow {
// id: debugStage
// // VitalsPanel has no implicit width — the slot measures its children, so
// // each staged panel states its own. Height follows the mode it is in.
// // Click a panel to collapse or expand it.
// Column {
// spacing: 12
// padding: 12
// HostPanel {
// width: 560
// }
// HostPanel {
// width: 560
// expanded: false
// }
// VitalsPanel {
// width: 560
// }
// VitalsPanel {
// width: 560
// expanded: false
// }
// }
// }
}