From b45049ac27555692755b4f833824b98905166b28 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 21 Jun 2024 17:52:13 +0200 Subject: [PATCH] Clean --- bin/clone-terminal | 1 - zsh/config.zsh | 5 ----- zsh/preserve-cwd-ssh.zsh | 5 +++++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/clone-terminal b/bin/clone-terminal index e22e255..6dc9b62 100755 --- a/bin/clone-terminal +++ b/bin/clone-terminal @@ -4,6 +4,5 @@ WINDOW_ID=$(xdotool getactivewindow) WM_NAME=$(xprop -id $WINDOW_ID WM_NAME | cut -d '"' -f 2) if [ -f $HOME/.config/terminalscwd/$WM_NAME.ssh ]; then - echo $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh) > ~/toto.txt alacritty -e sh -c "PARENT_TERMINAL=$WM_NAME ssh $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh)" fi diff --git a/zsh/config.zsh b/zsh/config.zsh index a5709bd..6408e26 100644 --- a/zsh/config.zsh +++ b/zsh/config.zsh @@ -14,11 +14,6 @@ # Uncomment following line if you want to disable autosetting terminal title. DISABLE_AUTO_TITLE="true" -if [ -z $TERMINAL_UUID ]; then - export TERMINAL_UUID=$(uuidgen) -fi -echo -en "\e]2;$TERMINAL_UUID\a" - # Uncomment following line if you want red dots to be displayed while waiting for completion # COMPLETION_WAITING_DOTS="true" diff --git a/zsh/preserve-cwd-ssh.zsh b/zsh/preserve-cwd-ssh.zsh index 43e2367..d3012bf 100644 --- a/zsh/preserve-cwd-ssh.zsh +++ b/zsh/preserve-cwd-ssh.zsh @@ -1,4 +1,9 @@ if [ "$PRESERVE_SSH_CWD" = "true" ]; then + if [ -z $TERMINAL_UUID ]; then + export TERMINAL_UUID=$(uuidgen) + fi + echo -en "\e]2;$TERMINAL_UUID\a" + mkdir -p $HOME/.config/terminalscwd/ cd() { builtin cd $1