Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
fix: Always launch prompt in a new window when xdg-terminal-exec is c…
Browse files Browse the repository at this point in the history
…alled with no input (ublue-os#748)
  • Loading branch information
KyleGospo authored Dec 22, 2023
1 parent c8d0663 commit 0531ff9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions usr/bin/xdg-terminal-exec
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0531ff9

Please sign in to comment.