#!/bin/sh -e
#
# this script is a helper that starts a new terminal window
# in the cwd of the calling process, rather than using the
# default cwd which is usually the home directory.

if command -v wezterm >/dev/null 2>&1; then
  exec wezterm start --cwd "${PWD}" -- "$@"
  # exec wezterm start --cwd "${PWD}" >/dev/null 2>&1 &
elif command -v kitty >/dev/null 2>&1; then
  exec kitty --working-directory "${PWD}" >/dev/null 2>&1 &
else
  exec konsole --workdir "${PWD}" "$@"
fi
