From add8074468ba9a08d4fe086965daa2283615d899 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Fri, 17 May 2024 11:59:02 -0400 Subject: [PATCH] Add a script for launching the best terminal --- scripts/ewp-best-terminal | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/ewp-best-terminal diff --git a/scripts/ewp-best-terminal b/scripts/ewp-best-terminal new file mode 100755 index 0000000..1604886 --- /dev/null +++ b/scripts/ewp-best-terminal @@ -0,0 +1,11 @@ +#! /bin/bash +set -e + +# Check for terminals in order of preference +[[ $(command -v gnome-terminal) ]] && gnome-terminal -- $@; exit 0 +[[ $(command -v wt.exe) ]] && wt.exe -- $@; exit 0 +[[ $(command -v mintty) ]] && mintty -- $@; exit 0 + +# If we get here, fail +echo "No terminal emulator found" >&2 +exit 1