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>
15 lines
634 B
Bash
Executable File
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"
|