From 3d40a7e1edb1eaf37226ac3087a685fa473a33ea Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Sat, 11 Jul 2026 10:08:50 +0100 Subject: [PATCH] feat(menu): open Doctor in a floating centered terminal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Launch nomarchy-doctor via ghostty --class=com.nomarchy.doctor (same pattern as the calendar popup) and match float/size/center windowrules so System › Doctor and the Waybar doctor click no longer tile. Verified: V1 — downstream-template-home builds; menu carries the class; hyprland.conf has float/size/center for com.nomarchy.doctor; windowrule-syntax green (19 rules). V2 live float confirm after nomarchy-home (same class mechanism as calendar). --- modules/home/hyprland.nix | 6 ++++++ modules/home/rofi.nix | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/home/hyprland.nix b/modules/home/hyprland.nix index c31bd43..07ce2f8 100644 --- a/modules/home/hyprland.nix +++ b/modules/home/hyprland.nix @@ -491,6 +491,12 @@ in "size 60% 65%, match:class ^(com\\.nomarchy\\.calendar)$" "center 1, match:class ^(com\\.nomarchy\\.calendar)$" + # Doctor sheet (System › Doctor / Waybar custom/doctor click): + # nomarchy-menu doctor → ghostty --class=com.nomarchy.doctor. + "float 1, match:class ^(com\\.nomarchy\\.doctor)$" + "size 55% 70%, match:class ^(com\\.nomarchy\\.doctor)$" + "center 1, match:class ^(com\\.nomarchy\\.doctor)$" + # Polkit auth (hyprpolkitagent — app id / binary name in the package) # and pinentry-qt (keys.nix default; org.gnupg.pinentry-qt desktop). # workspace current: agent was started on ws1 at login; without this diff --git a/modules/home/rofi.nix b/modules/home/rofi.nix index 5cd8f11..93129d4 100644 --- a/modules/home/rofi.nix +++ b/modules/home/rofi.nix @@ -801,10 +801,13 @@ ${themeRows} exec ${cfg.terminal} -e sudo nomarchy-snapshots ;; doctor) - # Read-only health sheet in a terminal; exit code doesn't matter - # here — the sheet itself is the product. - exec ${cfg.terminal} -e sh -c "nomarchy-doctor - printf '\nEnter to close.'; read -r _" ;; + # Read-only health sheet in a floating, centered ghostty window + # (class matched by hyprland.nix windowrules). --gtk-single-instance + # =false forces a fresh window — same pattern as nomarchy-calendar. + # Exit code doesn't matter; the sheet itself is the product. + exec ghostty --class=com.nomarchy.doctor --gtk-single-instance=false \ + -e sh -c "nomarchy-doctor + printf '\nEnter to close.'; read -r _" ;; firmware) # System ▸ Firmware — fwupd/LVFS update surface (HARDWARE.md §4).