#!/bin/bash

# blob:summary=Launch a TUI command in the default terminal with Blob styling
# blob:args=[--app-id=<app-id>] <command> [args...]

if [[ ${1:-} == --app-id=* ]]; then
  APP_ID="${1#--app-id=}"
  shift
else
  APP_ID="org.blob.$(basename $1)"
fi

exec setsid uwsm-app -- xdg-terminal-exec --app-id=$APP_ID -e "$1" "${@:2}"
