diff --git a/bin/blob-launch-terminal b/bin/blob-launch-terminal new file mode 100755 index 0000000..a6d046a --- /dev/null +++ b/bin/blob-launch-terminal @@ -0,0 +1,15 @@ +#!/bin/bash + +# blob:summary=Launch the default terminal +# blob:args=[command [args...]] + +if blob-cmd-present xdg-terminal-exec; then + exec setsid uwsm-app -- xdg-terminal-exec "$@" +fi + +for terminal in foot kitty; do + blob-cmd-present "$terminal" && exec setsid uwsm-app -- "$terminal" "$@" +done + +blob-notify-send "No terminal installed" "Install xdg-terminal-exec, foot or kitty." +exit 1 diff --git a/docs/commands.md b/docs/commands.md index 17e247b..78e30d4 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -296,6 +296,7 @@ of the `blob` listing. | `blob-launch-or-focus-webapp` | Launch or focus on a given web app identified by the window-pattern. | | | `blob-launch-screensaver` | Launch the Blob screensaver in the default terminal on the system with the correct font configuration. | - | | `blob-launch-shell` | Launch the Blob shell with its log kept in the journal (hidden) | - | +| `blob-launch-terminal` | Launch the default terminal | [command [args...]] | | `blob-launch-tui` | Launch a TUI command in the default terminal with Blob styling | [--app-id=] [args...] | | `blob-launch-webapp` | Launch a URL as a web app in the default supported browser | |