Files
omarchy/bin/omarchy-launch-floating-terminal-with-presentation
T
David Heinemeier HanssonandClaude Fable 5 bc0753dfcb Show a failure state when a presented command exits non-zero
The floating-terminal presentation wrapper showed the green "Done!"
prompt for every exit code except Ctrl-C, so a failed update or channel
switch closed looking like a success. Pass the command's exit code
through to omarchy-show-done and render a red "Failed (exit code N)!"
prompt when it is non-zero. The pkg install/remove pickers get the same
treatment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-13 10:21:46 +02:00

15 lines
634 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Launch a floating terminal with the Omarchy presentation wrapper
# omarchy:args=<command>
# Export the current theme's gum styling so gum widgets match the active theme
# even after a theme switch (the inherited environment is captured at login).
source omarchy-restart-gum
cmd="$*"
# 130 is the user bailing with Ctrl-C; anything else gets the Done/Failed prompt.
presentation_script="omarchy-show-logo; $cmd; code=\$?; if (( code != 130 )); then omarchy-show-done \$code; fi"
exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.terminal --title=Omarchy -e bash -c "$presentation_script"