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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHPDqx5hwLTwq27f7KpM9d
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
d2e1587ceb
commit
555cb4db75
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user