Fix launch_alacritty script

This commit is contained in:
Thomas Avé 2023-12-12 19:46:42 +01:00
parent 369625b965
commit a2cfb6637d
1 changed files with 2 additions and 2 deletions

View File

@ -14,9 +14,9 @@ if [ $RUNNING_SSH == true ]; then
PORT=$(ss -tnpa | grep ssh | grep "pid=$CHILD_PID" | awk '{ print $4 }' | grep -o '[0-9]*$')
alacritty -e ssh $CLIENT -t "cd \"\$(readlink -e /proc/\$(cat /tmp/ssh_session_$PORT)/cwd)\"; zsh --login"
else
if [ $(ps -p $1 -o comm=) == "alacritty" ]; then
if [ "$(ps -p $1 -o comm=)" == "alacritty" ]; then
CWD=$(readlink -e /proc/$CHILD_PID/cwd)
if [ $CWD != "" ]; then
if [ "$CWD" != "" ]; then
alacritty --working-directory "$CWD"
else
alacritty