This commit is contained in:
Thomas Forgione 2024-06-21 17:32:39 +02:00
parent e2559a9f85
commit 3ff0c82b3f
2 changed files with 3 additions and 3 deletions

View File

@ -5,5 +5,5 @@ WM_NAME=$(xprop -id $WINDOW_ID WM_NAME | cut -d '"' -f 2)
if [ -f $HOME/.config/terminalscwd/$WM_NAME.ssh ]; then if [ -f $HOME/.config/terminalscwd/$WM_NAME.ssh ]; then
echo $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh) > ~/toto.txt echo $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh) > ~/toto.txt
alacritty -e sh -c "TERMINAL_UUID=$WM_NAME ssh $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh)" alacritty -e sh -c "PARENT_TERMINAL=$WM_NAME ssh $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh)"
fi fi

View File

@ -5,8 +5,8 @@ if [ "$PRESERVE_SSH_CWD" = "true" ]; then
pwd > $HOME/.config/terminalscwd/$TERMINAL_UUID.pwd pwd > $HOME/.config/terminalscwd/$TERMINAL_UUID.pwd
} }
if [ -f $HOME/.config/terminalscwd/$TERMINAL_UUID.pwd ]; then if [ -f $HOME/.config/terminalscwd/$PARENT_TERMINAL.pwd ]; then
cd $(cat $HOME/.config/terminalscwd/$TERMINAL_UUID.pwd) cd $(cat $HOME/.config/terminalscwd/$PARENT_TERMINAL.pwd)
else else
cd cd
fi fi