Files
omarchycn/bin/omarchy-launch-floating-terminal-with-presentation
David Heinemeier HanssonandClaude Opus 4.8 86fd228cda Refresh gum theming when launching presentation terminals
gum_env.lua is fed into the compositor environment via hl.env at login,
but that environment is captured once and is not refreshed on a theme
switch. Terminals launched through uwsm-app inherit the caller's
environment (scopes don't read systemctl --user set-environment), so a
floating terminal would show the login-time theme's gum colors.

Extract the export logic into a sourced omarchy-restart-gum helper and
source it from the presentation terminal launcher so gum widgets match
the active theme.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 09:44:48 -07:00

14 lines
534 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="$*"
presentation_script="omarchy-show-logo; $cmd; if (( \$? != 130 )); then omarchy-show-done; fi"
exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.terminal --title=Omarchy -e bash -c "$presentation_script"