forked from ublue-os/bazzite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Always launch prompt in a new window when xdg-terminal-exec is c…
…alled with no input
- Loading branch information
Showing
1 changed file
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |