From ebdb17bf81f2586aa0a88227171008ea793495b2 Mon Sep 17 00:00:00 2001 From: nea Date: Thu, 22 Jun 2023 01:41:16 +0200 Subject: [PATCH] Add wezterm terminal support for linux --- src/SMAPI.Installer/assets/unix-launcher.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/SMAPI.Installer/assets/unix-launcher.sh b/src/SMAPI.Installer/assets/unix-launcher.sh index 778663d7..751e219e 100644 --- a/src/SMAPI.Installer/assets/unix-launcher.sh +++ b/src/SMAPI.Installer/assets/unix-launcher.sh @@ -93,7 +93,7 @@ else # run in terminal if [ "$USE_CURRENT_SHELL" == "false" ]; then # select terminal (prefer xterm for best compatibility, then known supported terminals) - for terminal in xterm gnome-terminal kitty terminator xfce4-terminal konsole terminal termite alacritty mate-terminal x-terminal-emulator; do + for terminal in xterm gnome-terminal kitty terminator xfce4-terminal konsole terminal termite alacritty mate-terminal x-terminal-emulator wezterm; do if command -v "$terminal" 2>/dev/null; then export TERMINAL_NAME=$terminal break; @@ -132,6 +132,11 @@ else exec "$TERMINAL_NAME" -- env TERM=xterm $LAUNCH_FILE "$@" ;; + wezterm) + # consumes all arguments after start --. does not copy working directory automatically, needs --cwd for that. + exec "$TERMINAL_NAME" start --cwd "$(pwd)" -- env TERM=xterm $LAUNCH_FILE "$@" + ;; + kitty) # consumes all trailing arguments exec "$TERMINAL_NAME" env TERM=xterm $LAUNCH_FILE "$@"