From 7bddd79adcb972f6108039cc883d26288ec10495 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Fri, 22 Dec 2023 10:02:03 -0800 Subject: [PATCH] fix: Always launch prompt in a new window when xdg-terminal-exec is called with no input --- usr/bin/xdg-terminal-exec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/usr/bin/xdg-terminal-exec b/usr/bin/xdg-terminal-exec index 2e1ebab7892..3453571ac54 100755 --- a/usr/bin/xdg-terminal-exec +++ b/usr/bin/xdg-terminal-exec @@ -1,9 +1,17 @@ #!/usr/bin/env bash if command -v /usr/bin/prompt > /dev/null; then - /usr/bin/prompt -- "$@" + if test -z "$@"; then + /usr/bin/prompt --new-window + else + /usr/bin/prompt -- "$@" + fi elif grep '^org\.gnome\.Prompt$' <<< $(/usr/bin/flatpak list --app --columns=application); then - /usr/bin/flatpak run org.gnome.Prompt -- "$@" + if test -z "$@"; then + /usr/bin/flatpak run org.gnome.Prompt --new-window + else + /usr/bin/flatpak run org.gnome.Prompt -- "$@" + fi else /usr/bin/gnome-terminal -- "$@" fi