From 555cb4db75fdd3b2fdacccbe2f5967f8b4ff2137 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 24 Jul 2026 16:36:50 -0700 Subject: [PATCH] Stop install invitations from re-showing after they run Voxtype/fingerprint invitations run as a transient omarchy-*-invitation.service that shows a critical toast and waits for a click. On click the service execs the install terminal, so the service stays active for the whole life of that terminal. The installer ends with omarchy-restart-shell, which re-triggers any still-running omarchy-*-invitation.service on the assumption that a still-running unit is an unanswered toast wiped by the shell restart. But an answered invitation is still running only because it is the parent of the very install terminal that triggered the restart, so it gets falsely re-fired and the invitation toast pops a second time right after the install finishes. Launch the installer in its own transient unit so the invitation service exits immediately after the click. Genuinely unanswered invitations still block in notify-send and are still recovered by restart-shell; answered ones are gone and no longer match the re-show glob. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01WHPDqx5hwLTwq27f7KpM9d --- install/user/first-run/install-voxtype.hook | 8 +++++++- install/user/first-run/setup-fingerprint.hook | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/install/user/first-run/install-voxtype.hook b/install/user/first-run/install-voxtype.hook index 63d025a0..14c556f9 100644 --- a/install/user/first-run/install-voxtype.hook +++ b/install/user/first-run/install-voxtype.hook @@ -4,7 +4,13 @@ set -e show_invitation() { if [[ -n $(omarchy-notification-send -u critical -g  "Install Dictation with Voxtype" "Click to install voice dictation for Omarchy." -a) ]]; then - omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install + # Launch the installer in its own transient unit so this invitation service + # can exit right after the click. If it stayed alive for the life of the + # install terminal, the installer's omarchy-restart-shell would re-trigger + # this still-running *-invitation unit and pop the toast a second time. + systemd-run --user --collect --quiet \ + --unit=omarchy-voxtype-install \ + omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install fi } diff --git a/install/user/first-run/setup-fingerprint.hook b/install/user/first-run/setup-fingerprint.hook index 5f75ee66..4ef1ba47 100644 --- a/install/user/first-run/setup-fingerprint.hook +++ b/install/user/first-run/setup-fingerprint.hook @@ -4,7 +4,13 @@ set -e show_invitation() { if [[ -n $(omarchy-notification-send -u critical -g 󰈷 "Setup Fingerprint Reader" "Enable sudo and unlocking with your fingerprint." -a) ]]; then - omarchy-launch-floating-terminal-with-presentation omarchy-setup-security-fingerprint + # Launch the setup in its own transient unit so this invitation service can + # exit right after the click. If it stayed alive for the life of the setup + # terminal, the setup's omarchy-restart-shell would re-trigger this + # still-running *-invitation unit and pop the toast a second time. + systemd-run --user --collect --quiet \ + --unit=omarchy-setup-security-fingerprint \ + omarchy-launch-floating-terminal-with-presentation omarchy-setup-security-fingerprint fi }